Opened 16 years ago

Last modified 14 years ago

#8904 closed

geodjango should return more informative error for mysql non-support — at Initial Version

Reported by: robstar Owned by: nobody
Component: GIS Version: 1.0
Severity: Keywords:
Cc: Triage Stage: Design decision needed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

A better error should be reported for when a distance lookup is attempted with mysql:

qs = Building.gobjects.filter(geo_locdistance_lte=(x, D(km=7)))

Traceback (most recent call last):

File "<console>", line 1, in <module>
File "/root/django-svn/Django-1.0-beta_2/django/db/models/manager.py", line 90, in filter

return self.get_query_set().filter(*args, kwargs)

File "/root/django-svn/Django-1.0-beta_2/django/db/models/query.py", line 481, in filter

return self._filter_or_exclude(False, *args, kwargs)

File "/root/django-svn/Django-1.0-beta_2/django/db/models/query.py", line 499, in _filter_or_exclude

clone.query.add_q(Q(*args, kwargs))

File "/root/django-svn/Django-1.0-beta_2/django/db/models/sql/query.py", line 1189, in add_q

can_reuse=used_aliases)

File "/root/django-svn/Django-1.0-beta_2/django/db/models/sql/query.py", line 1061, in add_filter

parts, opts, alias, True, allow_many, can_reuse=can_reuse)

File "/root/django-svn/Django-1.0-beta_2/django/db/models/sql/query.py", line 1377, in setup_joins

raise FieldError("Join on field %r not permitted." % name)

FieldError: Join on field 'geo_loc' not permitted.

Change History (0)

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