Commit 539cfe8c authored by Justin Bronn's avatar Justin Bronn
Browse files

Fixed #8904 -- Improved error message when spatial lookup is not available,...

Fixed #8904 -- Improved error message when spatial lookup is not available, and changed exception to `ValueError` to prevent swallowing of error on queryset evaluation.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@12887 bcc190cf-cafb-0310-a4f2-bffc1f526a37
parent 7e526578
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -241,7 +241,8 @@ class GeometryField(Field):

            return params
        else:
            raise TypeError("Field has invalid lookup: %s" % lookup_type)
            raise ValueError('%s is not a valid spatial lookup for %s.' %
                             (lookup_type, self.__class__.__name__))

    def get_prep_lookup(self, lookup_type, value):
        if lookup_type == 'isnull':