From cf8527ce845fe5105c9aa74333a933caa7bb8365 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Mon, 17 Sep 2018 11:45:15 +0200 Subject: Account wizard: add multiple profile - do not add a deleted profile --- ishtar_common/forms_common.py | 3 +-- ishtar_common/wizards.py | 2 ++ 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/ishtar_common/forms_common.py b/ishtar_common/forms_common.py index 99ad857b3..26c463189 100644 --- a/ishtar_common/forms_common.py +++ b/ishtar_common/forms_common.py @@ -781,8 +781,7 @@ class ProfileForm(ManageOldType): 'profile_type': models.ProfileType, 'area': models.Area } - profile_type = forms.ChoiceField(label=_(u"Type"), choices=[], - required=False) + profile_type = forms.ChoiceField(label=_(u"Type"), choices=[]) area = widgets.Select2MultipleField(label=_(u"Areas"), required=False) name = forms.CharField(label=_(u"Name"), required=False) pk = forms.IntegerField(label=" ", widget=forms.HiddenInput, required=False) diff --git a/ishtar_common/wizards.py b/ishtar_common/wizards.py index 62bafdfe4..5a1ab5843 100644 --- a/ishtar_common/wizards.py +++ b/ishtar_common/wizards.py @@ -1685,6 +1685,8 @@ class AccountWizard(Wizard): if data.get('DELETE', None): profile.delete() continue + elif data.get('DELETE', None): + continue name = data.get('name', None) -- cgit v1.2.3