Skip to content
Snippets Groups Projects
Commit 322302fd 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 8cf0ba51
No related merge requests found
...@@ -386,7 +386,7 @@ public class QuestionService implements IQuestionService { ...@@ -386,7 +386,7 @@ public class QuestionService implements IQuestionService {
throw new NotFoundException(); throw new NotFoundException();
} }
User user = userService.getCurrentUser(); 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)) { if (user == null || session == null || !session.isCreator(user)) {
throw new UnauthorizedException(); 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