- Notifications
You must be signed in to change notification settings - Fork32.4k
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Fixed #36262 -- Made GeneratedField.db_persist a required key-word argument.#19281
Conversation
This requires a docs update for GeneratedField and a test tweak 👍 |
Not sure if this mandates a release note as in the current version you need to include db_persist and it has to be a bool. This PR just changes the typing of it. |
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.
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.
Agreed.
Trac ticket number
ticket-36262
Branch description
GeneratedField.db_persist attribute is set to None=True, which implies that the value can be None. However, just 4 lines lower in the code, it is required to be either True or False. This inconsistency leads a developer to believe that it can be left blank but it cannot.
Checklist
main
branch.