Opened 3 years ago

Closed 3 years ago

#21228 closed Cleanup/optimization (fixed)

More explicit message for GeometryProxy set error on type mismatch

Reported by: Étienne Loks <etienne.loks@…> Owned by: nobody
Component: GIS Version: master
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no


class MyModel(models.Models):
  localisation = models.MultiPolygonField() 

my.localisation = Polygon(([0,1], [1,1], [1, 0], [0,0], [0,1]))
>>> cannot set MyModel GeometryProxy with value of type: <class 'django.contrib.gis.geos.geometries.Polygon'>

To be more relevant the error message should explain what kind of geometry is attended by GeometryProxy.

Attachments (1)

patch.diff (720 bytes) - added by Étienne Loks <etienne.loks@…> 3 years ago.

Download all attachments as: .zip

Change History (3)

Changed 3 years ago by Étienne Loks <etienne.loks@…>

Attachment: patch.diff added

comment:1 Changed 3 years ago by Claude Paroz

Needs documentation: unset
Needs tests: unset
Patch needs improvement: unset
Triage Stage: UnreviewedAccepted

comment:2 Changed 3 years ago by Claude Paroz

Resolution: fixed
Status: newclosed

Thanks for the suggestion, fixed in [8d75d1e1bc6052f934b3fc066cd362dae75e99a3].

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