mirror of https://github.com/django/django.git
Removed some logic that wasn't needed following removal of some deprecated code.
This commit is contained in:
parent
d63327d843
commit
c8c22ccdcb
|
@ -638,7 +638,7 @@ class QuerySet(object):
|
||||||
obj.query.select_for_update_nowait = nowait
|
obj.query.select_for_update_nowait = nowait
|
||||||
return obj
|
return obj
|
||||||
|
|
||||||
def select_related(self, *fields, **kwargs):
|
def select_related(self, *fields):
|
||||||
"""
|
"""
|
||||||
Returns a new QuerySet instance that will select related objects.
|
Returns a new QuerySet instance that will select related objects.
|
||||||
|
|
||||||
|
@ -647,9 +647,6 @@ class QuerySet(object):
|
||||||
|
|
||||||
If select_related(None) is called, the list is cleared.
|
If select_related(None) is called, the list is cleared.
|
||||||
"""
|
"""
|
||||||
if kwargs:
|
|
||||||
raise TypeError('Unexpected keyword arguments to select_related: %s'
|
|
||||||
% (list(kwargs),))
|
|
||||||
obj = self._clone()
|
obj = self._clone()
|
||||||
if fields == (None,):
|
if fields == (None,):
|
||||||
obj.query.select_related = False
|
obj.query.select_related = False
|
||||||
|
|
Loading…
Reference in New Issue