mirror of
https://codeberg.org/rimu/pyfedi
synced 2025-01-23 19:36:56 -08:00
post-reply soft-deletion: comment out uncalled routine
This commit is contained in:
parent
375235435e
commit
7983105c58
1 changed files with 9 additions and 0 deletions
|
@ -1513,9 +1513,18 @@ class PostReply(db.Model):
|
|||
return parent.author.public_url()
|
||||
|
||||
def delete_dependencies(self):
|
||||
"""
|
||||
The first loop doesn't seem to ever be invoked with the current behaviour.
|
||||
For replies with their own replies: functions which deal with removal don't set reply.deleted and don't call this, and
|
||||
because reply.deleted isn't set, the cli task 7 days later doesn't call this either.
|
||||
|
||||
The plan is to set reply.deleted whether there's child replies or not (as happens with the API call), so I've commented
|
||||
it out so the current behaviour isn't changed.
|
||||
|
||||
for child_reply in self.child_replies():
|
||||
child_reply.delete_dependencies()
|
||||
db.session.delete(child_reply)
|
||||
"""
|
||||
|
||||
db.session.query(PostReplyBookmark).filter(PostReplyBookmark.post_reply_id == self.id).delete()
|
||||
db.session.query(Report).filter(Report.suspect_post_reply_id == self.id).delete()
|
||||
|
|
Loading…
Reference in a new issue