Skip to content

Commit

Permalink
Return 404 for non-existent users
Browse files Browse the repository at this point in the history
  • Loading branch information
quantum5 committed Sep 16, 2024
1 parent 886fd42 commit e381e1f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion judge/views/user.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def dispatch(self, request, *args, **kwargs):
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
Expand Down

0 comments on commit e381e1f

Please sign in to comment.