-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Additional changes required to make fields optional #316
Conversation
This will need to be in place for pitt-crc/sam_scripts#35 to work properly. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See blank vs null:
https://docs.djangoproject.com/en/5.0/ref/models/fields/#null
I see, so So we want it to be OK to be null here so the requests with just the username are accepted, but blank should remain false as when it comes a user (or us on their behalf) making changes to their "user profile" values, first name/last name/email should be "required" fields before they can save any changes? |
@djperrefort So it turns out using |
…ser creation function
I realized while working on getting the user creation from the admin account creation tool to work properly that the initial changes I made to the User model were not sufficient to actually have the requests be well defined supplying just the user name.
This PR allows for the fields to be blank in addition to no longer being required, and importantly adjusts the signatures for
UserManager.create_user
andUserManager.create_superuser
so they are assumed to be inextra_fields
instead of being positional arguments.