From fc8c3de37a8c4474812f98a85305c89a596d24dc Mon Sep 17 00:00:00 2001 From: Mads Jensen Date: Mon, 19 Feb 2018 13:17:28 +0100 Subject: [PATCH] Removed Django < 1.5 guard for list/QuerySet in SettingsModelForm.save. --- src/wiki/plugins/notifications/forms.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/wiki/plugins/notifications/forms.py b/src/wiki/plugins/notifications/forms.py index 0ac3c921..8b33dec7 100644 --- a/src/wiki/plugins/notifications/forms.py +++ b/src/wiki/plugins/notifications/forms.py @@ -62,10 +62,7 @@ class SettingsModelForm(forms.ModelForm): def save(self, *args, **kwargs): instance = super().save(*args, **kwargs) if self.__editing_instance: - # Django < 1.5 returns list objects when ModelMultipleChoiceField - # is empty.. so check before calling delete() - if self.cleaned_data['delete_subscriptions']: - self.cleaned_data['delete_subscriptions'].delete() + self.cleaned_data['delete_subscriptions'].delete() if self.cleaned_data['email'] == 1: instance.subscription_set.all().update( send_emails=False, -- 2.45.2