From 4e2c2b652f8c3d5c9cbc2adbd15e8282c6ed45e7 Mon Sep 17 00:00:00 2001 From: Bai Date: Wed, 1 Feb 2023 15:48:30 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E5=88=9B=E5=BB=BA?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E5=BA=93=E6=97=B6=E5=8C=85=E5=90=AB=E8=B4=A6?= =?UTF-8?q?=E5=8F=B7=E5=A4=B1=E8=B4=A5=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/accounts/serializers/account/account.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/apps/accounts/serializers/account/account.py b/apps/accounts/serializers/account/account.py index a834756f0..cc13aced8 100644 --- a/apps/accounts/serializers/account/account.py +++ b/apps/accounts/serializers/account/account.py @@ -17,10 +17,11 @@ class AccountSerializerCreateValidateMixin: replace_attrs: callable def to_internal_value(self, data): - self.id = data.pop('id', None) - self.push_now = data.pop('push_now', False) - self.template = data.pop('template', False) - return super().to_internal_value(data) + ret = super().to_internal_value(data) + self.id = ret.pop('id', None) + self.push_now = ret.pop('push_now', False) + self.template = ret.pop('template', False) + return ret def set_secret(self, attrs): _id = self.id