summaryrefslogtreecommitdiff
path: root/django
diff options
context:
space:
mode:
authorSergey Fedoseev <fedoseev.sergey@gmail.com>2017-07-25 16:52:05 +0500
committerTim Graham <timograham@gmail.com>2017-07-25 07:52:05 -0400
commitd17eaa868cd6911197dcd8b096c4f0418c47007e (patch)
tree4982fa6bd3248b24eeaae0a383d235472ec93d64 /django
parentf32d24652b920135eb6a0f3de74599f03e181731 (diff)
Removed obsolete references to add_to_query().
Support for it was removed in d3f00bd5706b35961390d3814dd7e322ead3a9a3.
Diffstat (limited to 'django')
-rw-r--r--django/db/models/query.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/django/db/models/query.py b/django/db/models/query.py
index 36ebec1905..1b3c2629d6 100644
--- a/django/db/models/query.py
+++ b/django/db/models/query.py
@@ -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