perf: choice validate (#9404)

Co-authored-by: feng <1304903146@qq.com>
This commit is contained in:
fit2bot
2023-02-02 14:52:44 +08:00
committed by GitHub
parent 5fcd83b587
commit d78725f7c5

View File

@@ -66,7 +66,7 @@ class LabeledChoiceField(ChoiceField):
def to_internal_value(self, data):
if isinstance(data, dict):
return data.get("value")
data = data.get("value")
return super(LabeledChoiceField, self).to_internal_value(data)