From d78725f7c5ac51db0ceb43166302b50e1d62b1c2 Mon Sep 17 00:00:00 2001 From: fit2bot <68588906+fit2bot@users.noreply.github.com> Date: Thu, 2 Feb 2023 14:52:44 +0800 Subject: [PATCH] perf: choice validate (#9404) Co-authored-by: feng <1304903146@qq.com> --- apps/common/serializers/fields.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/common/serializers/fields.py b/apps/common/serializers/fields.py index 96ff7c103..84d4d5927 100644 --- a/apps/common/serializers/fields.py +++ b/apps/common/serializers/fields.py @@ -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)