Skip to content
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

Fixed #31410 -- Added system checks for invalid model field names in UniqueConstraint. #12856

Merged
merged 1 commit into from May 20, 2020

Conversation

hramezani
Copy link
Member

django/db/models/base.py Outdated Show resolved Hide resolved
@hramezani hramezani force-pushed the ticket_31410 branch 2 times, most recently from 69f28cd to a792c84 Compare May 4, 2020 22:23
django/db/models/base.py Outdated Show resolved Hide resolved
@felixxm
Copy link
Member

felixxm commented May 20, 2020

@hramezani Thanks 👍 After reconsideration I think we should limit this check only to UniqueConstraint's, it's not worth to add complex and error prone logic for CheckConstraint's, we can fail of custom expressions etc.

@hramezani hramezani changed the title Fixed #31410 -- Added check for fields of UniqueConstraints and CheckConstraint. Fixed #31410 -- Added check for fields of UniqueConstraints. May 20, 2020
@hramezani
Copy link
Member Author

@felixxm, I've just removed the CheckConstraint part. Should I move the release note to 3.2 🤔 ?

@felixxm
Copy link
Member

felixxm commented May 20, 2020

Release notes are not necessary.

@felixxm felixxm changed the title Fixed #31410 -- Added check for fields of UniqueConstraints. Fixed #28714 -- Added system checks for invalid model field names in UniqueConstraint. May 20, 2020
@felixxm felixxm changed the title Fixed #28714 -- Added system checks for invalid model field names in UniqueConstraint. Fixed #31410 -- Added system checks for invalid model field names in UniqueConstraint. May 20, 2020
django/db/models/base.py Outdated Show resolved Hide resolved
@felixxm
Copy link
Member

felixxm commented May 20, 2020

@hramezani Thanks 👍 I pushed minor edits and added docs changes.

@felixxm felixxm merged commit 3c7bf39 into django:master May 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants