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')
self.cleaned_data['value_decimal'] = None
self.cleaned_data['value_account'] = None
cache.delete(name)
super(SettingsForm, self).clean()
class FilterHistoryForm(forms.Form):

View file

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