Fix reset cache lors d'un update settings

This commit is contained in:
Aurélien Delobelle 2016-09-03 18:07:43 +02:00
parent 6899476868
commit 42f6144226
2 changed files with 2 additions and 3 deletions

View file

@ -396,7 +396,6 @@ class SettingsForm(forms.ModelForm):
raise ValidationError('Renseignez une durée') raise ValidationError('Renseignez une durée')
self.cleaned_data['value_decimal'] = None self.cleaned_data['value_decimal'] = None
self.cleaned_data['value_account'] = None self.cleaned_data['value_account'] = None
cache.delete(name)
super(SettingsForm, self).clean() super(SettingsForm, self).clean()
class FilterHistoryForm(forms.Form): class FilterHistoryForm(forms.Form):

View file

@ -672,8 +672,8 @@ class Settings(models.Model):
@staticmethod @staticmethod
def empty_cache(): def empty_cache():
cache.delete_many([ cache.delete_many([
'SUBVENTION_COF','OVERDRAFT_DURATION', 'OVERDRAFT_AMOUNT', 'SUBVENTION_COF', 'OVERDRAFT_DURATION', 'OVERDRAFT_AMOUNT',
'CANCEL_DURATION', 'CANCEL_DURATION', 'ADDCOST_AMOUNT', 'ADDCOST_FOR',
]) ])
class GenericTeamToken(models.Model): class GenericTeamToken(models.Model):