if /h/programming assimilates, move its posts to /h/slackernews

pull/64/head
Aevann1 2022-12-10 16:00:58 +02:00
parent 5e52a86500
commit 7d317e1fa8
1 changed files with 5 additions and 1 deletions

View File

@ -90,7 +90,11 @@ def _sub_inactive_purge_task():
posts = g.db.query(Submission).filter(Submission.sub.in_(names)).all()
for post in posts:
post.sub = None
if post.sub == 'programming':
post.sub = 'slackernews'
else:
post.sub = None
post.hole_pinned = None
g.db.add(post)