aboutsummaryrefslogtreecommitdiffstats
path: root/rest_framework
diff options
context:
space:
mode:
authorTom Christie2014-09-08 10:15:26 +0100
committerTom Christie2014-09-08 10:15:26 +0100
commit168710813cf9c313db41bac26b4e1481602efdb7 (patch)
tree584f6453dff76732bb4dd878ffd2b673f8277b6e /rest_framework
parentdc279530c7a19a4b258601991a177b90ee99daca (diff)
parent613a301a36f9167eec864e80336aee45a916a4e1 (diff)
downloaddjango-rest-framework-168710813cf9c313db41bac26b4e1481602efdb7.tar.bz2
Merge pull request #1844 from adamsc64/issue_1533
Fixed #1533 - Resolved issue with integer keys on nested choices never v...
Diffstat (limited to 'rest_framework')
-rw-r--r--rest_framework/fields.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/rest_framework/fields.py b/rest_framework/fields.py
index 8e15345d..c0253f86 100644
--- a/rest_framework/fields.py
+++ b/rest_framework/fields.py
@@ -563,7 +563,7 @@ class ChoiceField(WritableField):
if isinstance(v, (list, tuple)):
# This is an optgroup, so look inside the group for options
for k2, v2 in v:
- if value == smart_text(k2):
+ if value == smart_text(k2) or value == k2:
return True
else:
if value == smart_text(k) or value == k: