Skip to content

Commit

Permalink
fix(backend): 修复规则变更不存在审批人,则不串itsm节点 #8130
Browse files Browse the repository at this point in the history
  • Loading branch information
iSecloud committed Nov 22, 2024
1 parent 5eb554b commit 759b705
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
specific language governing permissions and limitations under the License.
"""

from backend.db_services.dbpermission.db_authorize.models import DBRuleActionLog
from backend.iam_app.dataclass.actions import ActionEnum
from backend.ticket import builders
from backend.ticket.builders.mysql.mysql_priv_change import (
Expand Down Expand Up @@ -40,3 +40,8 @@ class TendbAccountRuleChangeFlowBuilder(BaseTendbTicketFlowBuilder):
inner_flow_builder = TendbAccountRuleChangeFlowParamBuilder
itsm_flow_builder = TendbAccountRuleChangeItsmFlowParamBuilder
retry_type = FlowRetryType.MANUAL_RETRY

@property
def need_itsm(self):
approver_list = DBRuleActionLog.get_notifiers(self.ticket.details["rule_id"])
return bool(approver_list)

0 comments on commit 759b705

Please sign in to comment.