1
0
mirror of https://github.com/django/django.git synced 2025-07-05 18:29:11 +00:00

queryset-refactor: Removed the facility for select_related(False). It was

useless.


git-svn-id: http://code.djangoproject.com/svn/django/branches/queryset-refactor@7284 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Malcolm Tredinnick 2008-03-18 10:21:12 +00:00
parent 98b5667a06
commit 8b52e8e40e

View File

@ -381,8 +381,6 @@ class _QuerySet(object):
related objects are included in the selection.
"""
depth = kwargs.pop('depth', 0)
# TODO: Remove this? select_related(False) isn't really useful.
true_or_false = kwargs.pop('true_or_false', True)
if kwargs:
raise TypeError('Unexpected keyword arguments to select_related: %s'
% (kwargs.keys(),))
@ -392,7 +390,7 @@ class _QuerySet(object):
raise TypeError('Cannot pass both "depth" and fields to select_related()')
obj.query.add_select_related(fields)
else:
obj.query.select_related = true_or_false
obj.query.select_related = True
if depth:
obj.query.max_depth = depth
return obj