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 #27975 -- Fixed crash if ModelChoiceField's queryset=None. #8232

Closed
wants to merge 1 commit into from
Closed

Fixed #27975 -- Fixed crash if ModelChoiceField's queryset=None. #8232

wants to merge 1 commit into from

Conversation

jamesbeith
Copy link
Contributor

@jamesbeith jamesbeith commented Mar 22, 2017

This commit fixes a regression in the ability to use queryset=None on ModelChoiceField and later set the QuerySet in the form's __init__ method.

https://code.djangoproject.com/ticket/27975

@jamesbeith jamesbeith changed the title Only copy the field's queryset if it's not None Refs #27975 -- Only copy the field's queryset if it's not None Mar 22, 2017
This commit fixes a regression in the ability to use `queryset=None` on `ModelChoiceField` and later set the QuerySet in the form's `__init__` method.
@timgraham
Copy link
Member

Merged in 216bb2e, thanks! (For future reference, please send pull requests to master and the committer will backport from there.)

@timgraham timgraham closed this Mar 22, 2017
@timgraham timgraham changed the title Refs #27975 -- Only copy the field's queryset if it's not None Fixed #27975 -- Fixed crash if ModelChoiceField's queryset=None. Mar 22, 2017
@jamesbeith
Copy link
Contributor Author

Got it, thanks Tim.

@jamesbeith jamesbeith deleted the modelchoicefield-queryset-none branch March 23, 2017 23:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants