From e381e1f9b8e6355768138d0beba8d81b08c3b451 Mon Sep 17 00:00:00 2001 From: Quantum Date: Sun, 15 Sep 2024 22:09:02 -0400 Subject: [PATCH] Return 404 for non-existent users --- judge/views/user.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/judge/views/user.py b/judge/views/user.py index 19baad6d6..e38b0cd5e 100644 --- a/judge/views/user.py +++ b/judge/views/user.py @@ -81,7 +81,7 @@ class UserPage(TitleMixin, UserMixin, DetailView): return super(UserPage, self).dispatch(request, *args, **kwargs) except Http404: return generic_message(request, _('No such user'), _('No user handle "%s".') % - self.kwargs.get(self.slug_url_kwarg, None)) + self.kwargs.get(self.slug_url_kwarg, None), status=404) def get_title(self): return (_('My account') if self.request.user == self.object.user else