diff --git a/kuow_fetcher.py b/kuow_fetcher.py index fba159c..861f2da 100644 --- a/kuow_fetcher.py +++ b/kuow_fetcher.py @@ -128,15 +128,16 @@ with Session(engine) as session: .attrs["content"] .strip() ) - mastodon_post_result = mastodon.status_post( - status=article_description - + "\n" - + kuow_base_url - + article_link - + "\n#KUOW #News{}".format(additional_tag_string), - visibility="public", - ) - article_record.post_id = mastodon_post_result["id"] + if not article_record.post_id: + mastodon_post_result = mastodon.status_post( + status=article_description + + "\n" + + kuow_base_url + + article_link + + "\n#KUOW #News{}".format(additional_tag_string), + visibility="public", + ) + article_record.post_id = mastodon_post_result["id"] except: print("Could not load a description/post this article")