1
0
mirror of https://gitlab.com/animath/si/plateforme.git synced 2025-07-04 01:32:11 +02:00

Admin can see note details

This commit is contained in:
2021-04-04 13:30:02 +02:00
parent fbedb941be
commit 6b2ca1d2e1
2 changed files with 21 additions and 13 deletions

View File

@ -704,6 +704,8 @@ class PassageDetailView(LoginRequiredMixin, DetailView):
if self.request.user.registration in self.object.pool.juries.all():
context["my_note"] = Note.objects.get(passage=self.object, jury=self.request.user.registration)
context["notes"] = NoteTable([note for note in self.object.notes.all() if note])
elif self.request.user.registration.is_admin:
context["notes"] = NoteTable([note for note in self.object.notes.all() if note])
return context