Skip to content

Commit

Permalink
Merge 923c100 into 3fe53ae
Browse files Browse the repository at this point in the history
  • Loading branch information
yakky committed Jun 30, 2019
2 parents 3fe53ae + 923c100 commit a932300
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
7 changes: 6 additions & 1 deletion HISTORY.rst
Expand Up @@ -3,7 +3,12 @@
History
-------

1.2.0 (unreleased)
1.2.1 (2019-06-30)
++++++++++++++++++

* Fixed error when creating users with non-writable email attribute

1.2.0 (2019-03-22)
++++++++++++++++++

* Dropped compatiblity with Django <1.11, Python 3.4
Expand Down
5 changes: 4 additions & 1 deletion djangocms_helper/utils.py
Expand Up @@ -353,7 +353,10 @@ def create_user(username, email, password, is_staff=False, is_superuser=False,
if User.USERNAME_FIELD != 'email':
setattr(user, User.USERNAME_FIELD, username)

user.email = email
try:
user.email = email
except AttributeError:
pass
user.set_password(password)
if is_superuser:
user.is_superuser = True
Expand Down

0 comments on commit a932300

Please sign in to comment.