mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-07-23 22:49:50 +03:00
Merge 3867d9deb1
into e2175eb71b
This commit is contained in:
commit
d0fdc97f09
|
@ -693,9 +693,9 @@ class BooleanField(WritableField):
|
|||
default = False
|
||||
|
||||
def from_native(self, value):
|
||||
if value in ('t', 'True', '1'):
|
||||
if value in ('true', 't', 'True', '1'):
|
||||
return True
|
||||
if value in ('f', 'False', '0'):
|
||||
if value in ('false', 'f', 'False', '0'):
|
||||
return False
|
||||
return bool(value)
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user