From e0b0a531125f82378a7aa0182a70d5ccfc4a5b3b Mon Sep 17 00:00:00 2001 From: Qwann Date: Mon, 10 Apr 2017 17:18:43 +0200 Subject: [PATCH] stupidness removed --- kfet/views.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/kfet/views.py b/kfet/views.py index 0a3b6f99..dd4fb29a 100644 --- a/kfet/views.py +++ b/kfet/views.py @@ -68,20 +68,20 @@ class Home(TemplateView): def KFET_OPEN(): - kfet_open_date = cache.get('KFET_OPEN_DATE') - kfet_open = cache.get('KFET_OPEN') - if not kfet_open_date: + kfet_open_date = cache.get('KFET_OPEN_DATE', None) + kfet_open = cache.get('KFET_OPEN', None) + if kfet_open_date is None: kfet_open_date = timezone.now() cache.set('KFET_OPEN_DATE', kfet_open_date) - if not kfet_open: + if kfet_open is None: kfet_open = False cache.set('KFET_OPEN', kfet_open) return (kfet_open, kfet_open_date) def KFET_FORCE_CLOSE(): - kfet_force_close = cache.get('KFET_FORCE_CLOSE') - if not kfet_force_close: + kfet_force_close = cache.get('KFET_FORCE_CLOSE', None) + if kfet_force_close is None: kfet_force_close = False cache.set('KFET_FORCE_CLOSE', kfet_force_close) return kfet_force_close