mirror of
https://github.com/jointakahe/takahe.git
synced 2024-11-25 16:51:00 +00:00
404 deleted posts
This commit is contained in:
parent
23a3f7e9d2
commit
cc3c3d9816
1 changed files with 2 additions and 0 deletions
|
@ -27,6 +27,8 @@ class Individual(TemplateView):
|
||||||
if self.identity.blocked:
|
if self.identity.blocked:
|
||||||
raise Http404("Blocked user")
|
raise Http404("Blocked user")
|
||||||
self.post_obj = get_object_or_404(self.identity.posts, pk=post_id)
|
self.post_obj = get_object_or_404(self.identity.posts, pk=post_id)
|
||||||
|
if self.post_obj.state in [PostStates.deleted, PostStates.deleted_fanned_out]:
|
||||||
|
raise Http404("Deleted post")
|
||||||
# If they're coming in looking for JSON, they want the actor
|
# If they're coming in looking for JSON, they want the actor
|
||||||
if request.ap_json:
|
if request.ap_json:
|
||||||
# Return post JSON
|
# Return post JSON
|
||||||
|
|
Loading…
Reference in a new issue