Skip to content
Snippets Groups Projects
Commit 61645e14 authored by Daniel Gerhardt's avatar Daniel Gerhardt
Browse files

Fix deletion of free text answers (refs #7880)

There was a bug in the session retrieval code causing an exception.
parent 7b764e41
Branches
Tags
No related merge requests found
......@@ -382,7 +382,7 @@ public class QuestionService implements IQuestionService {
throw new NotFoundException();
}
User user = userService.getCurrentUser();
Session session = this.databaseDao.getSessionFromId(question.getSessionId());
Session session = this.databaseDao.getSessionFromKeyword(question.getSessionKeyword());
if (user == null || session == null || !session.isCreator(user)) {
throw new UnauthorizedException();
}
......
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