Commit 10884ec2 authored by Karen Tracey's avatar Karen Tracey
Browse files

Fixed #12239, again: Refined the original fix to avoid the test errors...

Fixed #12239, again: Refined the original fix to avoid the test errors introduced.  Thanks pmclanahan.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@12821 bcc190cf-cafb-0310-a4f2-bffc1f526a37
parent 9150fb6b
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -884,7 +884,8 @@ class IntegerField(Field):
        return int(value)

    def get_prep_lookup(self, lookup_type, value):
        if lookup_type == 'gte' or lookup_type == 'lt':
        if (lookup_type == 'gte' or lookup_type == 'lt') \
           and isinstance(value, float):
                value = math.ceil(value)
        return super(IntegerField, self).get_prep_lookup(lookup_type, value)