forked from rDrama/rDrama
clearer error message when replying to deleted shit
parent
2bf85bb7ca
commit
99ab57dea4
|
@ -121,7 +121,11 @@ def comment(v:User):
|
||||||
posting_to_submission = isinstance(post_target, Submission)
|
posting_to_submission = isinstance(post_target, Submission)
|
||||||
|
|
||||||
if not User.can_see(v, parent): abort(404)
|
if not User.can_see(v, parent): abort(404)
|
||||||
if not isinstance(parent, User) and parent.deleted_utc != 0: abort(404)
|
if not isinstance(parent, User) and parent.deleted_utc != 0:
|
||||||
|
if isinstance(parent, Submission):
|
||||||
|
abort(403, "This post has been deleted!")
|
||||||
|
else:
|
||||||
|
abort(403, "This comment has been deleted!")
|
||||||
|
|
||||||
if posting_to_submission:
|
if posting_to_submission:
|
||||||
sub = post_target.sub
|
sub = post_target.sub
|
||||||
|
|
Loading…
Reference in New Issue