cache the absence of an announcement as well

This commit is contained in:
Laura Klünder 2017-12-15 00:14:07 +01:00
parent 925a59010c
commit 6e952a2928

View file

@ -23,8 +23,8 @@ class Announcement(models.Model):
@classmethod
def get_current(cls):
result = cache.get('site:announcement', None)
if result is not None:
result = cache.get('site:announcement', False)
if result is not False:
return result
try: