Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
ARSnova Backend
Manage
Activity
Members
Labels
Plan
Issues
27
Issue boards
Milestones
Code
Merge requests
1
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Privacy
Imprint
Contact
Snippets
Groups
Projects
Show more breadcrumbs
ARSnova
ARSnova Backend
Commits
85d2af23
There was a problem fetching the pipeline stages.
Commit
85d2af23
authored
7 years ago
by
Daniel Gerhardt
Browse files
Options
Downloads
Patches
Plain Diff
Catch DocumentNotFoundException on design doc creation
parent
136134c1
1 merge request
!69
Fix design doc creation
Pipeline
#9325
passed with stages
in 1 minute and 58 seconds
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/java/de/thm/arsnova/persistance/couchdb/InitializingCouchDbConnector.java
+5
-4
5 additions, 4 deletions
...ova/persistance/couchdb/InitializingCouchDbConnector.java
with
5 additions
and
4 deletions
src/main/java/de/thm/arsnova/persistance/couchdb/InitializingCouchDbConnector.java
+
5
−
4
View file @
85d2af23
...
...
@@ -2,6 +2,7 @@ package de.thm.arsnova.persistance.couchdb;
import
com.fasterxml.jackson.core.JsonProcessingException
;
import
org.ektorp.CouchDbInstance
;
import
org.ektorp.DocumentNotFoundException
;
import
org.ektorp.impl.ObjectMapperFactory
;
import
org.ektorp.impl.StdCouchDbConnector
;
import
org.slf4j.Logger
;
...
...
@@ -62,12 +63,12 @@ public class InitializingCouchDbConnector extends StdCouchDbConnector implements
logger
.
warn
(
"Failed to serialize design doc."
,
e
);
}
}
String
rev
=
getCurrentRevision
((
String
)
doc
.
get
(
"_id"
));
if
(
rev
==
null
)
{
create
(
doc
);
}
else
{
try
{
String
rev
=
getCurrentRevision
((
String
)
doc
.
get
(
"_id"
));
doc
.
put
(
"_rev"
,
rev
);
update
(
doc
);
}
catch
(
DocumentNotFoundException
e
)
{
create
(
doc
);
}
});
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
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