fix: 账号密钥长度为8192时 刷新账号列表504 (#13196)

Co-authored-by: feng <1304903146@qq.com>
This commit is contained in:
fit2bot
2024-05-11 14:45:29 +08:00
committed by GitHub
parent 94ee3169dc
commit 52c905832b
3 changed files with 9 additions and 3 deletions

View File

@@ -35,6 +35,7 @@ class AccountTemplateSerializer(BaseAccountSerializer):
'su_from'
]
extra_kwargs = {
**BaseAccountSerializer.Meta.extra_kwargs,
'secret_strategy': {'help_text': _('Secret generation strategy for account creation')},
'auto_push': {'help_text': _('Whether to automatically push the account to the asset')},
'platforms': {
@@ -64,6 +65,9 @@ class AccountTemplateSerializer(BaseAccountSerializer):
class AccountTemplateSecretSerializer(SecretReadableMixin, AccountTemplateSerializer):
class Meta(AccountTemplateSerializer.Meta):
fields = AccountTemplateSerializer.Meta.fields + ['spec_info']
extra_kwargs = {
**AccountTemplateSerializer.Meta.extra_kwargs,
'secret': {'write_only': False},
'spec_info': {'label': _('Spec info')},
}