From e93798c266937f5afdce1177df97ea7937e2d0e1 Mon Sep 17 00:00:00 2001 From: Klaus-Uwe Mitterer Date: Sun, 28 Feb 2021 19:58:38 +0100 Subject: [PATCH] Replace max time parameter by current time --- mood/statistics.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mood/statistics.py b/mood/statistics.py index d4e7c64..abab4f5 100644 --- a/mood/statistics.py +++ b/mood/statistics.py @@ -48,7 +48,7 @@ def moodstats(user): maxval = Mood.objects.filter(user=user).latest("value").value maxy = maxval + max(maxval * 0.1, 1) - maxx = maxdate.timestamp() * 1000 + maxx = timezone.now().timestamp() * 1000 minx = maxx - (60*60*24*7) * 1000 output = points * line * timeseries.rolling(line, rolling_window=7)