The creation form for a StormpathUser instance does not include the username field. Thus, when creating users from the Django admin console, the username field gets set to a blank value. When creating a second user using the admin console, we get an error about a unique key contraints being violated on field username.
By maintaining the username field upon each save operation, we're preventing this.
I am wondering though why the username field is there in the first place if it's never editable in the admin...
The creation form for a
StormpathUser
instance does not include theusername
field. Thus, when creating users from the Django admin console, the username field gets set to a blank value. When creating a second user using the admin console, we get an error about a unique key contraints being violated on fieldusername
.By maintaining the
username
field upon each save operation, we're preventing this.I am wondering though why the
username
field is there in the first place if it's never editable in the admin...