Fixed GIS regression caused by force_subq

Caused by commit 7737305a4f
This commit is contained in:
Anssi Kääriäinen 2013-08-19 16:34:04 +03:00
parent 7b69c3e775
commit ddeb20e31b
1 changed files with 2 additions and 2 deletions

View File

@ -76,7 +76,7 @@ class GeoQuery(sql.Query):
return super(GeoQuery, self).convert_values(value, field, connection) return super(GeoQuery, self).convert_values(value, field, connection)
return value return value
def get_aggregation(self, using): def get_aggregation(self, using, force_subq=False):
# Remove any aggregates marked for reduction from the subquery # Remove any aggregates marked for reduction from the subquery
# and move them to the outer AggregateQuery. # and move them to the outer AggregateQuery.
connection = connections[using] connection = connections[using]
@ -84,7 +84,7 @@ class GeoQuery(sql.Query):
if isinstance(aggregate, gis_aggregates.GeoAggregate): if isinstance(aggregate, gis_aggregates.GeoAggregate):
if not getattr(aggregate, 'is_extent', False) or connection.ops.oracle: if not getattr(aggregate, 'is_extent', False) or connection.ops.oracle:
self.extra_select_fields[alias] = GeomField() self.extra_select_fields[alias] = GeomField()
return super(GeoQuery, self).get_aggregation(using) return super(GeoQuery, self).get_aggregation(using, force_subq)
def resolve_aggregate(self, value, aggregate, connection): def resolve_aggregate(self, value, aggregate, connection):
""" """