Bugfix for handeling receiving comments from rants having no comments. This crashed before this fix.

This commit is contained in:
retoor 2024-11-25 20:19:22 +01:00
parent a933009b66
commit d6f15e3c46

View File

@ -62,7 +62,7 @@ async def sync_comments():
rants_synced = 0
for rant in db["rants"].find(order_by="-id"):
rants_synced += 1
comments = dr.get_rant(rant["id"])["comments"]
comments = dr.get_rant(rant["id"]).get("comments",[])
for comment in comments:
comments_synced += 1
comment["created"] = timestamp_to_string(comment["created_time"])