Ticket #5679: 5679.diff

File 5679.diff, 706 bytes (added by Robert Coup, 17 years ago)
  • django/contrib/gis/db/models/proxy.py

     
    3333        return geom
    3434     
    3535    def __set__(self, obj, value):
    36         if isinstance(value, GEOSGeometry) and (value.geom_type.upper() == self._field._geom):
     36        if isinstance(value, GEOSGeometry) and (value.geom_type.upper() == self._field._geom or self._field._geom=="GEOMETRY"):
    3737            # Getting set with GEOS Geometry; geom_type must match that of the field.
    3838
    3939            # If value's SRID is not set, setting it to the field's SRID.
Back to Top