Skip to content
Snippets Groups Projects
Commit ff69d162 authored by Christoph Thelen's avatar Christoph Thelen
Browse files

Fixed 500 internal server error if question was not found

parent 73902d3d
No related merge requests found
......@@ -112,6 +112,9 @@ public class QuestionService implements IQuestionService {
@Authenticated
public Question getQuestion(String id) {
Question result = databaseDao.getQuestion(id);
if (result == null) {
return null;
}
if (!"freetext".equals(result.getQuestionType()) && 0 == result.getPiRound()) {
/* needed for legacy questions whose piRound property has not been set */
result.setPiRound(1);
......
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