From 833a8367cf1d1a5fe15d95f6a3f281f7651dee84 Mon Sep 17 00:00:00 2001 From: Evarin Date: Mon, 7 Jan 2019 22:11:51 +0100 Subject: [PATCH] =?UTF-8?q?404=20plut=C3=B4t=20que=20500=20sur=20profil=20?= =?UTF-8?q?inexistant?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- avisstage/views.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/avisstage/views.py b/avisstage/views.py index a808831..99c03bb 100644 --- a/avisstage/views.py +++ b/avisstage/views.py @@ -54,8 +54,8 @@ class ProfilView(LoginRequiredMixin, DetailView): # Restriction d'accès pour les archicubes if (en_scolarite(self.request.user) or self.kwargs.get('username') == self.request.user.username): - return Normalien.objects.get(user__username= - self.kwargs.get('username')) + return get_object_or_404( + Normalien, user__username=self.kwargs.get('username')) else: raise Http404