From c868378c71d7bd9883c1448977e185b1cd7c756c Mon Sep 17 00:00:00 2001 From: kycool Date: Fri, 18 Aug 2017 12:12:01 +0800 Subject: [PATCH] Update fields.py modify to_choices_dict document --- rest_framework/fields.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rest_framework/fields.py b/rest_framework/fields.py index 9cc9ab03f..242d0f978 100644 --- a/rest_framework/fields.py +++ b/rest_framework/fields.py @@ -142,7 +142,7 @@ def to_choices_dict(choices): to_choices_dict([1]) -> {1: 1} to_choices_dict([(1, '1st'), (2, '2nd')]) -> {1: '1st', 2: '2nd'} - to_choices_dict([('Group', ((1, '1st'), 2))]) -> {'Group': {1: '1st', 2: '2nd'}} + to_choices_dict([('Group', ((1, '1st'), 2))]) -> {'Group': {1: '1st', 2: '2'}} """ # Allow single, paired or grouped choices style: # choices = [1, 2, 3]