mirror of
https://github.com/django/django.git
synced 2025-10-28 16:16:12 +00:00
Removed obsolete references to add_to_query().
Support for it was removed in d3f00bd570.
This commit is contained in:
committed by
Tim Graham
parent
f32d24652b
commit
d17eaa868c
@@ -796,13 +796,13 @@ class QuerySet:
|
||||
"""
|
||||
Return a new QuerySet instance with filter_obj added to the filters.
|
||||
|
||||
filter_obj can be a Q object (or anything with an add_to_query()
|
||||
method) or a dictionary of keyword lookup arguments.
|
||||
filter_obj can be a Q object or a dictionary of keyword lookup
|
||||
arguments.
|
||||
|
||||
This exists to support framework features such as 'limit_choices_to',
|
||||
and usually it will be more natural to use other methods.
|
||||
"""
|
||||
if isinstance(filter_obj, Q) or hasattr(filter_obj, 'add_to_query'):
|
||||
if isinstance(filter_obj, Q):
|
||||
clone = self._clone()
|
||||
clone.query.add_q(filter_obj)
|
||||
return clone
|
||||
|
||||
Reference in New Issue
Block a user