Should fix problem when comment/post with subdir doesn't exist pt. 2

This commit is contained in:
Simon 2018-06-06 19:40:08 -04:00
parent f396d326b9
commit a2835bbbcf

View File

@ -36,6 +36,7 @@ def handle_subdir_repost(website_id, reddit_obj):
subdir_stats = db.get_subdir_stats(website_id, subdir)
if subdir_stats["total_size"] <= 0:
message += " but I couldn't calculate the size of this subdirectory."
else:
tables["Subdirectory `/" + subdir + "`:"] = subdir_stats
comment = bot.get_comment(tables, website_id, message)
print(comment)