mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-08-04 12:30:11 +03:00
fix representation of IntegerField
This commit is contained in:
parent
ebb4070467
commit
7c806aaaec
|
@ -845,7 +845,7 @@ class IntegerField(Field):
|
|||
return data
|
||||
|
||||
def to_representation(self, value):
|
||||
return int(value)
|
||||
return int(value) if value is not None else None
|
||||
|
||||
|
||||
class FloatField(Field):
|
||||
|
|
Loading…
Reference in New Issue
Block a user