Opened 11 years ago

Closed 11 years ago

#5438 closed (fixed)

GeometryProxy: evaluate empty string to None

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


The following code:

from django.contrib.gis.test.geoapp.models import City
c = City()

throws an exception from GeometryProxy.__get__, because the geom_value is '', and so it tries to create a GEOSGeometry from it.

Attached patch and tests evaluates '' (and u'') to None instead.

Attachments (1)

proxy_newmodel_none.patch (1.6 KB) - added by Robert Coup 11 years ago.

Download all attachments as: .zip

Change History (5)

Changed 11 years ago by Robert Coup

Attachment: proxy_newmodel_none.patch added

comment:1 Changed 11 years ago by Adrian Holovaty

Version: SVNgis

comment:2 Changed 11 years ago by jbronn

Owner: changed from nobody to jbronn
Status: newassigned

comment:3 Changed 11 years ago by jbronn

Status: assignednew

comment:4 Changed 11 years ago by jbronn

Resolution: fixed
Status: newclosed

(In [6243]) gis: Fixed #5438 with patches from rcoup.

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