-
Notifications
You must be signed in to change notification settings - Fork 9
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
Fix(models): allow blank #1979
Fix(models): allow blank #1979
Conversation
Coverage reportClick to see where and how coverage changed
This report was generated by python-coverage-comment-action |
e059701
to
d78fd32
Compare
in addition to allowing null in the database for this field, forms should allow blank values for this field.
d78fd32
to
d722818
Compare
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.
I get that these are only changes that impact the Admin forms, but I still think a migration is required.
- Check out
dev
and runbin/reset_db.sh
(now DB looks like it does ondev
) - Check out this branch and run
bin/init.sh
(which is what the appcontainer will run indev
) - See output:
Operations to perform:
Apply all migrations: admin, auth, contenttypes, core, django_google_sso, sessions
Running migrations:
No migrations to apply.
Your models in app(s): 'core' have changes that are not yet reflected in a migration, and so won't be applied.
Run 'manage.py makemigrations' to make new migrations, and then re-run 'manage.py migrate' to apply them.
Ah, thanks for catching this |
f3212b6
to
662d621
Compare
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.
This isn't totally related, but I feel like since you're updating models for editing in the Admin...
It seems like we forgot to list AuthProvider
in the models that are registered for editing in the Admin: https://github.com/cal-itp/benefits/blob/dev/benefits/core/admin.py#L19
Do you think you can add that here so we can just be done with it?
this is so AuthProvider can be edited too
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.
👍
Closes #1977
This PR sets
blank
toTrue
for all nullable fields on our models. This is so form validation on those fields will allow blank values.