Ticket #11489: 11489.diff

File 11489.diff, 673 bytes (added by jamesturk, 6 years ago)

initial patch, tests coming

  • django/contrib/gis/db/models/sql/query.py

    diff --git a/django/contrib/gis/db/models/sql/query.py b/django/contrib/gis/db/models/sql/query.py
    index 5df15a8..4bca354 100644
    a b class GeoQuery(sql.Query): 
    223223            # the `geo_values` attribute is defined.
    224224            for value, field in izip(row[index_start:], fields):
    225225                values.append(self.convert_values(value, field))
     226            # We need to append the aggregates (at the end of row)
     227            values.extend(row[-len(self.aggregates):])
    226228        else:
    227229            values.extend(row[index_start:])
    228230        return tuple(values)
Back to Top