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