Opened 12 years ago

Closed 12 years ago

#20190 closed Bug (needsinfo)

Accessing a deferred GIS (MultiPolygonField) field on a model instance recursion error

Reported by: brian@… Owned by: nobody
Component: GIS Version: 1.5
Severity: Normal Keywords: geodjango gis defer recursion
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

For a model defined similar to:

class MyModel(models.Model):
    mpoly = models.MultiPolygonField()
  
    objects = models.GeoManager()

trying to access mpoly as a deferred field leads to recursion error:

inst = MyModel.objects.get(id=1).mpoly  #works

inst = MyModel.objects.defer('mpoly').get(id=1).mpoly  #fails
RuntimeError: maximum recursion depth exceeded while calling a Python object

Change History (1)

comment:1 by Claude Paroz, 12 years ago

Resolution: needsinfo
Status: newclosed

I cannot repoduce this error on 1.5 or master. It would be nice if you could create a failing test case in the GeoDjango test suite.

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