#10807: 'Constraint' object has no attribute 'relabel_aliases' when using | with GeoQueryset -----------------------------------+---------------------------------------- Reporter: bretthoerner | Owner: bretthoerner Status: assigned | Milestone: 1.1 Component: GIS | Version: 1.1-beta-1 Resolution: | Keywords: Stage: Accepted | Has_patch: 0 Needs_docs: 0 | Needs_tests: 0 Needs_better_patch: 0 | -----------------------------------+---------------------------------------- Changes (by bretthoerner):
* owner: nobody => bretthoerner * status: new => assigned Comment: I used git-bisect that it broke on [9702], {{{ Traceback (most recent call last): File "../djtest/test.py", line 13, in <module> print qs1 | qs2 File "/a/djtest/lib/python2.6/site-packages/django/db/models/query.py", line 255, in __or__ combined.query.combine(other.query, sql.OR) File "/a/djtest/lib/python2.6/site- packages/django/db/models/sql/query.py", line 373, in combine w.relabel_aliases(change_map) File "/a/djtest/lib/python2.6/site- packages/django/db/models/sql/where.py", line 211, in relabel_aliases elt = list(child[0]) TypeError: 'Constraint' object is not iterable }}} [9702] were changes to catch up with [9700] on trunk, where the above test case gives the following, {{{ Traceback (most recent call last): File "../djtest/test.py", line 11, in <module> qs1 = Place.objects.filter(name='A', location__distance_lte=(point, D(mi=5))) File "/a/djtest/lib/python2.6/site- packages/django/db/models/manager.py", line 102, in filter return self.get_query_set().filter(*args, **kwargs) File "/a/djtest/lib/python2.6/site-packages/django/db/models/query.py", line 489, in filter return self._filter_or_exclude(False, *args, **kwargs) File "/a/djtest/lib/python2.6/site-packages/django/db/models/query.py", line 507, in _filter_or_exclude clone.query.add_q(Q(*args, **kwargs)) File "/a/djtest/lib/python2.6/site- packages/django/db/models/sql/query.py", line 1241, in add_q can_reuse=used_aliases) File "/a/djtest/lib/python2.6/site- packages/django/db/models/sql/query.py", line 1184, in add_filter connector) File "/a/djtest/lib/python2.6/site- packages/django/contrib/gis/db/models/sql/where.py", line 32, in add alias, col, field, lookup_type, value = data ValueError: need more than 3 values to unpack }}} -- Ticket URL: <http://code.djangoproject.com/ticket/10807#comment:2> Django <http://code.djangoproject.com/> The Web framework for perfectionists with deadlines. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django updates" group. To post to this group, send email to django-updates@googlegroups.com To unsubscribe from this group, send email to django-updates+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-updates?hl=en -~----------~----~----~----~------~----~------~--~---