mirror of
https://github.com/django/django.git
synced 2025-07-06 10:49:17 +00:00
queryset-refactor: Fixed a bug in QuerySet.get(). Also removed unneeded code form EmptyQuerySet.
git-svn-id: http://code.djangoproject.com/svn/django/branches/queryset-refactor@6484 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
7ebf3068c1
commit
dfe7e4e925
@ -146,7 +146,6 @@ class _QuerySet(object):
|
||||
keyword arguments.
|
||||
"""
|
||||
clone = self.filter(*args, **kwargs)
|
||||
clone.query.clear_ordering()
|
||||
obj_list = list(clone)
|
||||
if len(obj_list) < 1:
|
||||
raise self.model.DoesNotExist("%s matching query does not exist."
|
||||
@ -501,6 +500,7 @@ class DateQuerySet(QuerySet):
|
||||
c._order = self._order
|
||||
return c
|
||||
|
||||
# XXX; Everything below here is done.
|
||||
class EmptyQuerySet(QuerySet):
|
||||
def __init__(self, model=None):
|
||||
super(EmptyQuerySet, self).__init__(model)
|
||||
@ -517,9 +517,6 @@ class EmptyQuerySet(QuerySet):
|
||||
c._result_cache = []
|
||||
return c
|
||||
|
||||
def _get_sql_clause(self):
|
||||
raise EmptyResultSet
|
||||
|
||||
# QOperator, QAnd and QOr are temporarily retained for backwards compatibility.
|
||||
# All the old functionality is now part of the 'Q' class.
|
||||
class QOperator(Q):
|
||||
|
Loading…
x
Reference in New Issue
Block a user