Handle invalid status urls with 404
This commit is contained in:
parent
d021666f2b
commit
0365a57307
2 changed files with 13 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue