stormpath / stormpath-django

Django plugin for Stormpath
Apache License 2.0
38 stars 19 forks source link

Maintain 'username' field upon saving StormpathUser instances #30

Closed davidmarquis closed 9 years ago

davidmarquis commented 9 years ago

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...

rdegges commented 9 years ago

Heyo -- quick question: why did you close this one out?

davidmarquis commented 9 years ago

To change the destination branch, I selected master instead of develop and did not find a quick way to update that in the PR so I figured I'd close and re-do again :)