Get user by any username for status page

This commit is contained in:
Mouse Reeve 2020-03-10 11:28:11 -07:00
parent 7cf87be35c
commit 3e48adad52

View file

@ -185,7 +185,7 @@ def status_page(request, username, status_id):
# we have a json request # we have a json request
return incoming.get_status(request, username, status_id) return incoming.get_status(request, username, status_id)
try: try:
user = models.User.objects.get(localname=username) user = get_user_from_username(username)
status = models.Status.objects.select_subclasses().get(id=status_id) status = models.Status.objects.select_subclasses().get(id=status_id)
except ValueError: except ValueError:
return HttpResponseNotFound() return HttpResponseNotFound()