mirror of
https://github.com/django/django.git
synced 2025-01-03 06:55:47 +00:00
Refs #35339 -- Fixed source expressions in GeoAggregate on Oracle.
Regression in 42b567ab4c
.
This commit is contained in:
parent
828b94b178
commit
8c257cecff
@ -34,17 +34,14 @@ class GeoAggregate(Aggregate):
|
||||
tolerance = self.extra.get("tolerance") or getattr(self, "tolerance", 0.05)
|
||||
clone = self.copy()
|
||||
source_expressions = self.get_source_expressions()
|
||||
if self.filter:
|
||||
source_expressions.pop()
|
||||
source_expressions.pop() # Don't wrap filters with SDOAGGRTYPE().
|
||||
spatial_type_expr = Func(
|
||||
*source_expressions,
|
||||
Value(tolerance),
|
||||
function="SDOAGGRTYPE",
|
||||
output_field=self.output_field,
|
||||
)
|
||||
source_expressions = [spatial_type_expr]
|
||||
if self.filter:
|
||||
source_expressions.append(self.filter)
|
||||
source_expressions = [spatial_type_expr, self.filter]
|
||||
clone.set_source_expressions(source_expressions)
|
||||
return clone.as_sql(compiler, connection, **extra_context)
|
||||
return self.as_sql(compiler, connection, **extra_context)
|
||||
|
Loading…
Reference in New Issue
Block a user