Merge pull request #11080 from jumpserver/pr@dev@fix_bulk_update_asset_error

perf: 修复批量更新资产导致的错误
pull/11093/head
老广 2023-07-26 09:51:45 +08:00 committed by GitHub
commit 9deb48b16b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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