404 plutôt que 500 sur profil inexistant
This commit is contained in:
parent
5275e9036a
commit
833a8367cf
1 changed files with 2 additions and 2 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue