1
0
Fork 0

Merge pull request #829 from mouse-reeve/status-404s

Handle invalid status urls with 404
This commit is contained in:
Mouse Reeve 2021-03-30 11:01:05 -07:00 committed by GitHub
commit 8b9b70d9cd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 1 deletions

View file

@ -115,7 +115,7 @@ class Status(View):
status = models.Status.objects.select_subclasses().get(
id=status_id, deleted=False
)
except ValueError:
except (ValueError, models.Status.DoesNotExist):
return HttpResponseNotFound()
# the url should have the poster's username in it