mirror of
https://github.com/django/django.git
synced 2025-07-05 02:09:13 +00:00
[soc2009/multidb] Fixed a bug with the dates() queryset method and Oracle
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/multidb@11404 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
c7af1de191
commit
1e583db0df
@ -949,7 +949,10 @@ class DateQuerySet(QuerySet):
|
||||
instance.
|
||||
"""
|
||||
self.query.clear_deferred_loading()
|
||||
self.query = self.query.clone(klass=sql.DateQuery, setup=True)
|
||||
self.query = self.query.clone(
|
||||
klass=self.query.connection.ops.query_class(sql.Query, sql.DateQuery),
|
||||
setup=True
|
||||
)
|
||||
self.query.select = []
|
||||
field = self.model._meta.get_field(self._field_name, many_to_many=False)
|
||||
assert isinstance(field, DateField), "%r isn't a DateField." \
|
||||
|
Loading…
x
Reference in New Issue
Block a user