#5679 closed (fixed)
Can't assign GEOS geometries to a general GeometryField
Reported by: | Robert Coup | Owned by: | jbronn |
---|---|---|---|
Component: | GIS | Version: | dev |
Severity: | Keywords: | ||
Cc: | Triage Stage: | Unreviewed | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
class MyModel(models.Models, models.GeoMixin): geom = models.GeometryField() ... my.geom=Point(0,1) >>> cannot set GEOMETRY GeometryProxy with value of type: <class 'django.contrib.gis.geos.geometries.Polygon'>
GeometryProxy checks the geometry type of the new value against that of the field, but it doesn't make a special case for a GEOMETRY column (which can have any sort of geometry assigned).
Attached patch resolves.
Attachments (1)
Change History (3)
by , 17 years ago
comment:1 by , 17 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
Fixed in 6467 (w/tests). Thanks rcoup!