From 7d317e1fa8e0f75e4914bb9942aa6dcecc1adc78 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Sat, 10 Dec 2022 16:00:58 +0200 Subject: [PATCH] if /h/programming assimilates, move its posts to /h/slackernews --- files/helpers/cron.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/files/helpers/cron.py b/files/helpers/cron.py index b8b10207f..816cc7290 100644 --- a/files/helpers/cron.py +++ b/files/helpers/cron.py @@ -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)