fix: account update (#10039)

Co-authored-by: feng <1304903146@qq.com>
This commit is contained in:
fit2bot 2023-03-22 19:14:43 +08:00 committed by GitHub
parent f7ae23f7d9
commit 0be3cb3c27
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -45,7 +45,10 @@ class SecretTypeValidator:
def __call__(self, attrs, serializer):
secret_types = set()
asset = attrs['asset']
if serializer.instance:
asset = serializer.instance.asset
else:
asset = attrs['asset']
secret_type = attrs['secret_type']
platform_protocols_dict = {
name: self.protocol_settings.get(name, {}).get('secret_types', [])