perf: 自动化name 唯一键 校验 (#9668)

Co-authored-by: feng <1304903146@qq.com>
This commit is contained in:
fit2bot
2023-02-21 18:31:42 +08:00
committed by GitHub
parent 266e7e0dd7
commit b41880d4f2
8 changed files with 89 additions and 57 deletions

View File

@@ -1,4 +1,4 @@
import copy
from accounts.const import AutomationTypes
from accounts.models import PushAccountAutomation
from .change_secret import (
ChangeSecretAutomationSerializer, ChangeSecretUpdateAssetSerializer,
@@ -14,6 +14,10 @@ class PushAccountAutomationSerializer(ChangeSecretAutomationSerializer):
if n not in ['recipients']
]
@property
def model_type(self):
return AutomationTypes.push_account
class PushAccountUpdateAssetSerializer(ChangeSecretUpdateAssetSerializer):
class Meta: