Django

Code

Ticket #5438 (closed: fixed)

Opened 1 year ago

Last modified 1 year ago

GeometryProxy: evaluate empty string to None

Reported by: rcoup Assigned to: jbronn
Milestone: Component: GIS
Version: gis Keywords: sprint
Cc: Triage Stage: Unreviewed
Has patch: 1 Needs documentation: 0
Needs tests: 0 Patch needs improvement: 0

Description

The following code:

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

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

proxy_newmodel_none.patch (1.6 kB) - added by rcoup on 09/13/07 20:51:09.

Change History

09/13/07 20:51:09 changed by rcoup

  • attachment proxy_newmodel_none.patch added.

09/13/07 23:37:57 changed by adrian

  • needs_better_patch changed.
  • version changed from SVN to gis.
  • needs_tests changed.
  • needs_docs changed.

09/14/07 13:15:49 changed by jbronn

  • owner changed from nobody to jbronn.
  • status changed from new to assigned.

09/14/07 13:15:56 changed by jbronn

  • status changed from assigned to new.

09/14/07 17:56:44 changed by jbronn

  • status changed from new to closed.
  • resolution set to fixed.

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


Add/Change #5438 (GeometryProxy: evaluate empty string to None)




Change Properties
Action