Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
cesium-plus-pod
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
clients
Cesium-grp
cesium-plus-pod
Commits
c76a219a
Commit
c76a219a
authored
6 years ago
by
Benoit Lavenier
Browse files
Options
Downloads
Patches
Plain Diff
[fix] Error on user/profile document : string value for 'time' cause an synchro error - fix
#37
parent
ab074209
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
cesium-plus-pod-core/src/main/java/org/duniter/elasticsearch/synchro/AbstractSynchroAction.java
+12
-1
12 additions, 1 deletion
.../duniter/elasticsearch/synchro/AbstractSynchroAction.java
with
12 additions
and
1 deletion
cesium-plus-pod-core/src/main/java/org/duniter/elasticsearch/synchro/AbstractSynchroAction.java
+
12
−
1
View file @
c76a219a
...
...
@@ -523,7 +523,18 @@ public abstract class AbstractSynchroAction extends AbstractService implements S
}
// Check version
Number
existingVersion
=
((
Number
)
existingFields
.
get
(
versionFieldName
));
Number
existingVersion
=
null
;
Object
versionObj
=
existingFields
.
get
(
versionFieldName
);
if
(
versionObj
!=
null
)
{
if
(
versionObj
instanceof
String
)
{
existingVersion
=
Long
.
parseLong
((
String
)
versionObj
);
}
else
if
(
versionObj
instanceof
Number
)
{
existingVersion
=
((
Number
)
versionObj
);
}
else
{
throw
new
InvalidFormatException
(
String
.
format
(
"Invalid document: '%s' should be a long, but found: %s"
,
versionFieldName
,
versionObj
));
}
}
boolean
doUpdate
=
(
existingVersion
==
null
||
version
>
existingVersion
.
longValue
());
if
(
doUpdate
)
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment