diff --git a/app/cli.py b/app/cli.py index 88b88dd8..ed2b024b 100644 --- a/app/cli.py +++ b/app/cli.py @@ -74,6 +74,7 @@ def register(app): db.session.add(BannedInstances(domain='pieville.net')) db.session.add(BannedInstances(domain='noauthority.social')) db.session.add(BannedInstances(domain='pieville.net')) + db.session.add(BannedInstances(domain='links.hackliberty.org')) interests = file_get_contents('interests.txt') db.session.add(Interest(name='🕊 Chilling', communities=parse_communities(interests, 'chilling'))) db.session.add(Interest(name='💭 Interesting stuff', communities=parse_communities(interests, 'interesting stuff'))) diff --git a/app/models.py b/app/models.py index 821edd90..d754092e 100644 --- a/app/models.py +++ b/app/models.py @@ -599,6 +599,9 @@ class User(UserMixin, db.Model): post.delete_dependencies() post.flush_cache() 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()