Skip to content
Snippets Groups Projects
Commit de3915b7 authored by Tom Käsler's avatar Tom Käsler
Browse files

dead questionids in sortorder are now not throwing exceptions

parent 1ac3feb8
No related merge requests found
......@@ -643,6 +643,9 @@ public class CouchDBDao implements IDatabaseDao, ApplicationEventPublisherAware
public Question getQuestion(final String id) {
try {
final Document q = getDatabase().getDocument(id);
if (q == null) {
return null;
}
final Question question = (Question) JSONObject.toBean(q.getJSONObject(), Question.class);
final JSONArray possibleAnswers = q.getJSONObject().getJSONArray("possibleAnswers");
@SuppressWarnings("unchecked")
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment