Fixes for __ne operator in IntField and FloatField
This commit is contained in:
parent
7a1b110f62
commit
d305e71c27
1 changed files with 6 additions and 0 deletions
|
|
@ -167,6 +167,9 @@ class IntField(BaseField):
|
|||
self.error('Integer value is too large')
|
||||
|
||||
def prepare_query_value(self, op, value):
|
||||
if value is None:
|
||||
return value
|
||||
|
||||
return int(value)
|
||||
|
||||
|
||||
|
|
@ -194,6 +197,9 @@ class FloatField(BaseField):
|
|||
self.error('Float value is too large')
|
||||
|
||||
def prepare_query_value(self, op, value):
|
||||
if value is None:
|
||||
return value
|
||||
|
||||
return float(value)
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue