diff --git a/files/helpers/cron.py b/files/helpers/cron.py index 34a835f62..ba997b645 100644 --- a/files/helpers/cron.py +++ b/files/helpers/cron.py @@ -138,6 +138,9 @@ def get_names(): return ' and '.join([x[0] for x in g.db.query(Orgy.title).filter_by(type='file').order_by(Orgy.start_utc).limit(2)]) def _create_post(title, body, pin_hours): + if not g.db.query(Orgy).filter_by(type='file').first(): + return + _delete_all_posts() title += f': {get_names()}'