From f797925d5e0c868a202ea93684f7bedd814e327b Mon Sep 17 00:00:00 2001 From: lza_menace Date: Sat, 15 May 2021 09:03:26 -0700 Subject: [PATCH] bug fix, store the fact we posted to reddit --- suchwow/app.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/suchwow/app.py b/suchwow/app.py index 000f6d6..c4981d5 100644 --- a/suchwow/app.py +++ b/suchwow/app.py @@ -100,8 +100,12 @@ def post_reddit(last_hours): ).order_by(Post.timestamp.asc()) for p in posts: if p.hours_elapsed() < int(last_hours): - make_post(p) - return + if not p.to_reddit: + _p = make_post(p) + if _p: + _p.to_reddit = True + _p.save() + return @app.cli.command("create_accounts") def create_accounts():