stormpath / stormpath-django

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

Maintain 'username' field upon saving StormpathUser instances #31

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