From d3a76166862821d338dfedab78471241f0a60ec9 Mon Sep 17 00:00:00 2001 From: Tanner Collin Date: Thu, 16 Apr 2020 04:54:33 +0000 Subject: [PATCH] Clear next meeting and clean stats if there's none --- apiserver/apiserver/api/utils_stats.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/apiserver/apiserver/api/utils_stats.py b/apiserver/apiserver/api/utils_stats.py index f951f80..fadd271 100644 --- a/apiserver/apiserver/api/utils_stats.py +++ b/apiserver/apiserver/api/utils_stats.py @@ -30,8 +30,13 @@ def calc_next_events(): if member_meeting: cache.set('next_meeting', member_meeting.datetime) + else: + cache.set('next_meeting', None) + if monthly_clean: cache.set('next_clean', monthly_clean.datetime) + else: + cache.set('next_clean', None) def calc_member_counts(): members = models.Member.objects