🐛 fix: handle case for no announcements

This commit is contained in:
Bhupesh-V 2024-12-31 22:06:21 +05:30
parent e9a454fa5a
commit 101b529307
2 changed files with 1 additions and 1 deletions

View File

@ -60,7 +60,6 @@ def main():
leaderboard_data = get_leaderboard_data()
formatted_stats = format_leaderboard(leaderboard_data)
print(formatted_stats)
update_reddit_post(reddit, reddit_post_id, formatted_stats)
if __name__ == "__main__":

View File

@ -154,6 +154,7 @@ def create_community_roundup_post(
**Community Roundup is posted on the last day of each month. To explore a compilation of all interesting posts and community threads over time, [visit our wiki](https://www.reddit.com/r/developersIndia/wiki/community-threads/).**\n
The collection is curated by our volunteer team & is independent of the number of upvotes and comments (except for "I made This" posts). If you believe we may have overlooked any engaging posts or discussions, please share them with us via [modmail](https://reddit.com/message/compose?to=r/developersIndia&subject=Community%20Threads%20Collection%20Suggestion&message=Hey%20folks%2C%0A%0A%3Cpost%20link%3E).\n
"""
text = ""
if len(announcement_posts) > 0:
text = "## Announcements\n|Announcements from volunteer team|\n|--------|\n"