diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2018-09-17 11:45:15 +0200 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2018-09-17 11:45:15 +0200 |
commit | cf8527ce845fe5105c9aa74333a933caa7bb8365 (patch) | |
tree | 266d4bea389e26828ab8a5fa46ca4fd73afb7815 | |
parent | c6f2a2057cdf30a56d391c7572cd9f14e1fc98e1 (diff) | |
download | Ishtar-cf8527ce845fe5105c9aa74333a933caa7bb8365.tar.bz2 Ishtar-cf8527ce845fe5105c9aa74333a933caa7bb8365.zip |
Account wizard: add multiple profile - do not add a deleted profile
-rw-r--r-- | ishtar_common/forms_common.py | 3 | ||||
-rw-r--r-- | 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) |