mirror of
https://codeberg.org/rimu/pyfedi
synced 2025-02-03 00:31:25 -08:00
delete posts in community when community is deleted #78
This commit is contained in:
parent
950590db5f
commit
15f834c08e
1 changed files with 2 additions and 3 deletions
|
@ -688,9 +688,8 @@ def community_delete(community_id: int):
|
|||
if community.is_local():
|
||||
community.banned = True
|
||||
# todo: federate deletion out to all instances. At end of federation process, delete_dependencies() and delete community
|
||||
else:
|
||||
community.delete_dependencies()
|
||||
db.session.delete(community)
|
||||
community.delete_dependencies()
|
||||
db.session.delete(community)
|
||||
db.session.commit()
|
||||
flash(_('Community deleted'))
|
||||
return redirect('/communities')
|
||||
|
|
Loading…
Add table
Reference in a new issue