mirror of
https://github.com/jazzband/django-constance.git
synced 2026-03-16 22:40:24 +00:00
Revert "Only set the attribute if value has changed"
This reverts commit 56fb550044.
This commit is contained in:
parent
826c494fd1
commit
bfc09f9982
1 changed files with 2 additions and 3 deletions
|
|
@ -108,8 +108,7 @@ class ConstanceForm(forms.Form):
|
|||
|
||||
def save(self):
|
||||
for name in settings.CONFIG:
|
||||
if str(getattr(config, name)) != str(self.cleaned_data[name]):
|
||||
setattr(config, name, self.cleaned_data[name])
|
||||
setattr(config, name, self.cleaned_data[name])
|
||||
|
||||
def clean_version(self):
|
||||
value = self.cleaned_data['version']
|
||||
|
|
@ -151,7 +150,7 @@ class ConstanceAdmin(admin.ModelAdmin):
|
|||
'default': localize(default),
|
||||
'help_text': _(help_text),
|
||||
'value': localize(value),
|
||||
'modified': str(value) != str(default),
|
||||
'modified': value != default,
|
||||
'form_field': form[name],
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue