mirror of
https://codeberg.org/rimu/pyfedi
synced 2025-01-23 19:36:56 -08:00
empty post replies when purging
This commit is contained in:
parent
6ceefd8dd3
commit
6cf59b1c3a
2 changed files with 4 additions and 0 deletions
|
@ -74,6 +74,7 @@ def register(app):
|
||||||
db.session.add(BannedInstances(domain='pieville.net'))
|
db.session.add(BannedInstances(domain='pieville.net'))
|
||||||
db.session.add(BannedInstances(domain='noauthority.social'))
|
db.session.add(BannedInstances(domain='noauthority.social'))
|
||||||
db.session.add(BannedInstances(domain='pieville.net'))
|
db.session.add(BannedInstances(domain='pieville.net'))
|
||||||
|
db.session.add(BannedInstances(domain='links.hackliberty.org'))
|
||||||
interests = file_get_contents('interests.txt')
|
interests = file_get_contents('interests.txt')
|
||||||
db.session.add(Interest(name='🕊 Chilling', communities=parse_communities(interests, 'chilling')))
|
db.session.add(Interest(name='🕊 Chilling', communities=parse_communities(interests, 'chilling')))
|
||||||
db.session.add(Interest(name='💭 Interesting stuff', communities=parse_communities(interests, 'interesting stuff')))
|
db.session.add(Interest(name='💭 Interesting stuff', communities=parse_communities(interests, 'interesting stuff')))
|
||||||
|
|
|
@ -599,6 +599,9 @@ class User(UserMixin, db.Model):
|
||||||
post.delete_dependencies()
|
post.delete_dependencies()
|
||||||
post.flush_cache()
|
post.flush_cache()
|
||||||
db.session.delete(post)
|
db.session.delete(post)
|
||||||
|
post_replies = PostReply.query.filter_by(user_id=self.id).all()
|
||||||
|
for reply in post_replies:
|
||||||
|
reply.body = reply.body_html = reply.body_html_safe = ''
|
||||||
db.session.commit()
|
db.session.commit()
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue