Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#5679 closed (fixed)

Can't assign GEOS geometries to a general GeometryField

Reported by: rcoup Owned by: jbronn
Component: GIS Version: master
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:


class MyModel(models.Models, models.GeoMixin):
  geom = models.GeometryField() 

>>> 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)

5679.diff (706 bytes) - added by rcoup 8 years ago.

Download all attachments as: .zip

Change History (3)

Changed 8 years ago by rcoup

comment:1 Changed 8 years ago by jbronn

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Resolution set to fixed
  • Status changed from new to closed

Fixed in 6467 (w/tests). Thanks rcoup!

comment:2 Changed 8 years ago by jbronn

Meant to say fixed in r6467.

Note: See TracTickets for help on using tickets.
Back to Top