mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-01-23 15:54:16 +03:00
Fix for JSON integer match to a ChoiceField
This commit is contained in:
parent
1d24d1fc59
commit
71ccab593b
|
@ -794,7 +794,7 @@ class ChoiceField(WritableField):
|
||||||
if value == smart_unicode(k2):
|
if value == smart_unicode(k2):
|
||||||
return True
|
return True
|
||||||
else:
|
else:
|
||||||
if value == smart_unicode(k):
|
if value == smart_unicode(k) or value == k:
|
||||||
return True
|
return True
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user