Skip to content

Commit

Permalink
Don't crash the site when viewing invalid evaluation
Browse files Browse the repository at this point in the history
  • Loading branch information
thibault committed Jul 6, 2023
1 parent c32db03 commit d34e149
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion envergo/evaluations/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,9 @@ def get_template_names(self):
RESULTS.action_requise: "evaluations/detail/action_requise.html",
}
evaluation = self.object
template_names = [templates.get(evaluation.result)]
template_names = [
templates.get(evaluation.result, "evaluations/not_found.html")
]
return template_names

def get_queryset(self):
Expand Down

0 comments on commit d34e149

Please sign in to comment.