Check for empty as well

This commit is contained in:
Alexander Dörflinger
2025-12-12 10:08:09 +01:00
parent 6efa057cff
commit 9a9e8b204c

View File

@@ -215,13 +215,13 @@ class ChristmasBot:
data = self.db.get_forest_data()
if self.last_updated_data and len(self.last_updated_data) == len(data):
if self.last_updated_data and (len(self.last_updated_data) == len(data) or len(data) == 0):
# Nothing changed.
print(f"No change in dashboard, last checked {now}...", end="\r")
return
print("📝 Updating Forest Dashboard...")
self.last_updated_data = data
body = "# 🎄 The Christmas Forest 🎄\n\n"
body += "### How to Participate:\n"
body += "1. Send a DM to u/{}\n".format(config.username)