perf: 批量创建账号 没解密 (#10226)

Co-authored-by: feng <1304903146@qq.com>
pull/10228/head
fit2bot 2 years ago committed by GitHub
parent cff4309b03
commit 5a34372ca5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -14,7 +14,7 @@ from assets.models import Asset
from common.serializers import SecretReadableMixin
from common.serializers.fields import ObjectRelatedField, LabeledChoiceField
from common.utils import get_logger
from .base import BaseAccountSerializer
from .base import BaseAccountSerializer, AuthValidateMixin
logger = get_logger(__name__)
@ -228,7 +228,9 @@ class AssetAccountBulkSerializerResultSerializer(serializers.Serializer):
changed = serializers.BooleanField(read_only=True, label=_('Changed'))
class AssetAccountBulkSerializer(AccountCreateUpdateSerializerMixin, serializers.ModelSerializer):
class AssetAccountBulkSerializer(
AccountCreateUpdateSerializerMixin, AuthValidateMixin, serializers.ModelSerializer
):
assets = serializers.PrimaryKeyRelatedField(queryset=Asset.objects, many=True, label=_('Assets'))
class Meta:

Loading…
Cancel
Save