mirror of
https://codeberg.org/rimu/pyfedi
synced 2025-02-03 00:31:25 -08:00
old cross posts
This commit is contained in:
parent
c5208b1afe
commit
5465f945be
1 changed files with 1 additions and 1 deletions
|
@ -1008,7 +1008,7 @@ def post_delete_post(community: Community, post: Post, user_id: int, federate_al
|
||||||
old_cross_posts = Post.query.filter(Post.id.in_(post.cross_posts)).all()
|
old_cross_posts = Post.query.filter(Post.id.in_(post.cross_posts)).all()
|
||||||
post.cross_posts.clear()
|
post.cross_posts.clear()
|
||||||
for ocp in old_cross_posts:
|
for ocp in old_cross_posts:
|
||||||
if ocp.cross_posts is not None:
|
if ocp.cross_posts is not None and post.id in ocp.cross_posts:
|
||||||
ocp.cross_posts.remove(post.id)
|
ocp.cross_posts.remove(post.id)
|
||||||
post.delete_dependencies()
|
post.delete_dependencies()
|
||||||
post.deleted = True
|
post.deleted = True
|
||||||
|
|
Loading…
Add table
Reference in a new issue