Commit 6e60c8b7 authored by Russell Keith-Magee's avatar Russell Keith-Magee
Browse files

[1.1.X] Fixed #13171 -- Corrected the field_subclassing unit test. Thanks to...

[1.1.X] Fixed #13171 -- Corrected the field_subclassing unit test. Thanks to Gabriel Hurley for the report and patch.

Backport of r12838 from trunk.

git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.1.X@12839 bcc190cf-cafb-0310-a4f2-bffc1f526a37
parent 75285653
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -48,7 +48,7 @@ class SmallField(models.Field):
            return [force_unicode(v) for v in value]
        if lookup_type == 'isnull':
            return []
        raise FieldError('Invalid lookup type: %r' % lookup_type)
        raise TypeError('Invalid lookup type: %r' % lookup_type)


class JSONField(models.TextField):
+1 −1
Original line number Diff line number Diff line
@@ -51,7 +51,7 @@ True
>>> MyModel.objects.filter(data__lt=s)
Traceback (most recent call last):
...
FieldError: Invalid lookup type: 'lt'
TypeError: Invalid lookup type: 'lt'

# Serialization works, too.
>>> stream = serializers.serialize("json", MyModel.objects.all())