Cache access to cache object

This commit is contained in:
Raphael Michel
2017-10-17 18:00:07 +02:00
parent 7e1e259897
commit 03133dc1fd
12 changed files with 115 additions and 23 deletions

View File

@@ -315,11 +315,11 @@ class Voucher(LoggedModel):
def save(self, *args, **kwargs):
self.code = self.code.upper()
super().save(*args, **kwargs)
self.event.get_cache().set('vouchers_exist', True)
self.event.cache.set('vouchers_exist', True)
def delete(self, using=None, keep_parents=False):
super().delete(using, keep_parents)
self.event.get_cache().delete('vouchers_exist')
self.event.cache.delete('vouchers_exist')
def is_in_cart(self) -> bool:
"""