BaseGenericInlineFormSet.get_queryset calls .empty()
Reported by: |
Zak Johnson <zakj@…> |
Owned by: |
Brian Rosner |
Component:
|
Contrib apps
|
Version:
|
dev
|
Severity:
|
|
Keywords:
|
|
Cc:
|
|
Triage Stage:
|
Accepted
|
Has patch:
|
yes
|
Needs documentation:
|
no
|
Needs tests:
|
no
|
Patch needs improvement:
|
no
|
Easy pickings:
|
no
|
UI/UX:
|
no
|
In BaseGenericInlineFormSet.get_queryset():
if self.instance is None:
return self.model._default_manager.empty()
Managers don't have an empty()
method; this should instead be get_empty_query_set()
. Attached patch (against trunk revision 9836) includes a doctest to illustrate the problem.
Wow, that must have been a brain dead commit by me. You are correct
empty()
is not on a manager, butnone()
would have been correct here. Thanks for the patch!