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

Make Model.get(val = None) work the same as Model.select().where(Model.val == None) #1202

Merged
merged 1 commit into from
Mar 5, 2017
Merged

Conversation

Necoro
Copy link
Contributor

@Necoro Necoro commented Mar 4, 2017

Currently Model.select().where(val == None) compiles into a WHERE val IS NULL clause. On the other hand Model.get(val = None) compiled into WHERE val = NULL and, if val is an FK field, tried to join.

With this PR, this is fixed and Model.get behaves just like Model.select().where()

@coleifer coleifer merged commit 113ef55 into coleifer:master Mar 5, 2017
@coleifer
Copy link
Owner

coleifer commented Mar 5, 2017

Nice, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants