Merge pull request #11888 from jumpserver/pr@dev@perf_protocols_lose

perf: 修复协议丢失的问题
pull/11892/head
老广 1 year ago committed by GitHub
commit 16e8c7faba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -175,6 +175,8 @@ class AssetSerializer(BulkOrgResourceModelSerializer, WritableNestedModelSeriali
protocols = self.initial_data.get('protocols')
if protocols is not None:
return
if getattr(self, 'instance', None):
return
protocols_required, protocols_default = self._get_protocols_required_default()
protocol_map = {str(protocol.id): protocol for protocol in protocols_required + protocols_default}

Loading…
Cancel
Save