perf: 修复批量更新资产导致的错误

pull/11080/head
ibuler 2023-07-25 14:45:24 +08:00
parent ae0daddbea
commit 806baeb136
1 changed files with 2 additions and 0 deletions

View File

@ -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