Opened 11 years ago

Closed 11 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: dev
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

Description

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@…> 11 years ago.

Download all attachments as: .zip

Change History (3)

by Étienne Loks <etienne.loks@…>, 11 years ago

Attachment: patch.diff added

comment:1 by Claude Paroz, 11 years ago

Triage Stage: UnreviewedAccepted

comment:2 by Claude Paroz, 11 years ago

Resolution: fixed
Status: newclosed

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

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