diff options
author | Étienne Loks <etienne.loks@proxience.com> | 2015-12-14 23:22:18 +0100 |
---|---|---|
committer | Étienne Loks <etienne.loks@proxience.com> | 2015-12-14 23:22:18 +0100 |
commit | ad087e96d28d048dd7e87cd82df6b9a05a47d73d (patch) | |
tree | 33e2b3470a8cee12975fec1cbc57f1f82bd9802d | |
parent | 7826c57022d68648fb4676d2bbe493a0142df4ba (diff) | |
download | Ishtar-ad087e96d28d048dd7e87cd82df6b9a05a47d73d.tar.bz2 Ishtar-ad087e96d28d048dd7e87cd82df6b9a05a47d73d.zip |
Fix account creation for person with empty name and surname
-rw-r--r-- | ishtar_common/wizards.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ishtar_common/wizards.py b/ishtar_common/wizards.py index 29496d21b..d00766978 100644 --- a/ishtar_common/wizards.py +++ b/ishtar_common/wizards.py @@ -1157,7 +1157,8 @@ class AccountWizard(Wizard): now = datetime.datetime.now() account = models.IshtarUser( person=person, username=dct['username'], email=dct['email'], - first_name=person.surname, last_name=person.name, + first_name=person.surname or '***', + last_name=person.name or '***', is_staff=False, is_active=True, is_superuser=False, last_login=now, date_joined=now) if dct['password']: |