From 806baeb13601884c8f5c2aed59ce5840eb7380ca Mon Sep 17 00:00:00 2001 From: ibuler Date: Tue, 25 Jul 2023 14:45:24 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=E4=BF=AE=E5=A4=8D=E6=89=B9=E9=87=8F?= =?UTF-8?q?=E6=9B=B4=E6=96=B0=E8=B5=84=E4=BA=A7=E5=AF=BC=E8=87=B4=E7=9A=84?= =?UTF-8?q?=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/assets/serializers/asset/common.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/apps/assets/serializers/asset/common.py b/apps/assets/serializers/asset/common.py index 718efbb0d..7d7eb4ec9 100644 --- a/apps/assets/serializers/asset/common.py +++ b/apps/assets/serializers/asset/common.py @@ -157,6 +157,8 @@ class AssetSerializer(BulkOrgResourceModelSerializer, WritableNestedModelSeriali def _extract_accounts(self): if not getattr(self, 'initial_data', None): return + if isinstance(self.initial_data, list): + return accounts = self.initial_data.pop('accounts', None) self._accounts = accounts