Author: mtredinnick
Date: 2007-10-13 21:11:47 -0500 (Sat, 13 Oct 2007)
New Revision: 6484
Modified:
django/branches/queryset-refactor/django/db/models/query.py
Log:
queryset-refactor: Fixed a bug in QuerySet.get(). Also removed unneeded code
form EmptyQuerySet.
Modified: django/branches/queryset-refactor/django/db/models/query.py
===================================================================
--- django/branches/queryset-refactor/django/db/models/query.py 2007-10-13
18:45:49 UTC (rev 6483)
+++ django/branches/queryset-refactor/django/db/models/query.py 2007-10-14
02:11:47 UTC (rev 6484)
@@ -146,7 +146,6 @@
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 @@
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 @@
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):
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---