Skip to content

Commit

Permalink
fix(backend): 修复tendbcluster重命名校验问题 TencentBlueKing#6535
Browse files Browse the repository at this point in the history
  • Loading branch information
iSecloud committed Aug 29, 2024
1 parent cbcaaeb commit 0dfdb17
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion dbm-ui/backend/ticket/builders/tendbcluster/tendb_rename.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"""
from django.utils.translation import ugettext as _

from backend.db_meta.enums import ClusterType
from backend.flow.engine.controller.spider import SpiderController
from backend.ticket import builders
from backend.ticket.builders.mysql.mysql_ha_rename import MySQLHaRenameFlowParamBuilder, MySQLHaRenameSerializer
Expand All @@ -18,7 +19,13 @@


class TendbRenameSerializer(MySQLHaRenameSerializer):
pass
def validate(self, attrs):
super().validate_cluster_can_access(attrs)
# 集群类型校验
super().validated_cluster_type(attrs, cluster_type=ClusterType.TenDBCluster)
# DB重命名校验
super().validate_rename_db(attrs)
return attrs


class TendbRenameFlowParamBuilder(MySQLHaRenameFlowParamBuilder):
Expand Down

0 comments on commit 0dfdb17

Please sign in to comment.