Ticket #11087: 11087.diff

File 11087.diff, 954 bytes (added by David Gouldin, 15 years ago)
  • contrib/gis/db/models/sql/where.py

     
    3535            return super(WhereNode, self).add(data, connector)
    3636
    3737        obj, lookup_type, value = data
    38         alias, col, field = obj.alias, obj.col, obj.field
     38        col, field = obj.col, obj.field
    3939
    4040        if not hasattr(field, "geom_type"):
    4141            # Not a geographic field, so call `WhereNode.add`.
     
    7676            # the `get_geo_where_clause` to construct the appropriate
    7777            # spatial SQL when `make_atom` is called.
    7878            annotation = GeoAnnotation(field, value, where)
     79            alias = obj.alias
    7980            return super(WhereNode, self).add(((alias, col, field.db_type()), lookup_type, annotation, params), connector)
    8081
    8182    def make_atom(self, child, qn):
Back to Top