From 3b3c0927f3c6a71d9c150d9467884342e79bb4b9 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Mon, 25 Apr 2022 23:10:55 +0200 Subject: [PATCH] fsd --- files/routes/static.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/files/routes/static.py b/files/routes/static.py index 06d35ccebb..0717e34575 100644 --- a/files/routes/static.py +++ b/files/routes/static.py @@ -205,10 +205,8 @@ def cached_chart(kind): today_cutoff = calendar.timegm(midnight_this_morning) if kind == "daily": - file = f"../{SITE}_daily.png" day_cutoffs = [today_cutoff - 86400 * i for i in range(47)][1:] else: - file = f"../{SITE}_weekly.png" day_cutoffs = [today_cutoff - 86400 * 7 * i for i in range(47)][1:] day_cutoffs.insert(0, calendar.timegm(now)) @@ -255,6 +253,8 @@ def cached_chart(kind): posts_chart.legend(loc='upper left', frameon=True) comments_chart.legend(loc='upper left', frameon=True) + file = f"../{SITE}_{kind}.png" + plt.savefig(file) plt.clf() return file