Fix the default value of enabled when not included in the import

This commit is contained in:
Sander Steffann 2019-11-23 00:48:42 +01:00
parent 2186c2ff56
commit 53411119a0

View File

@ -2495,7 +2495,7 @@ class InterfaceCSVForm(forms.ModelForm):
def clean_enabled(self): def clean_enabled(self):
# Make sure enabled is True when it's not included in the uploaded data # Make sure enabled is True when it's not included in the uploaded data
if 'enabled' in self.data: if 'enabled' not in self.data:
return True return True
else: else:
return self.cleaned_data['enabled'] return self.cleaned_data['enabled']