Skip to content

Commit

Permalink
fix(backend): 修复互斥keyerror问题 #8591
Browse files Browse the repository at this point in the history
  • Loading branch information
iSecloud committed Dec 13, 2024
1 parent c1f3f9b commit b5215f8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dbm-ui/backend/ticket/models/ticket.py
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ def has_exclusive_operations(self, ticket_type, cluster_id, **kwargs):
for record in active_records:
active_ticket_type = record.ticket.ticket_type
# 记录互斥信息。不存在互斥表默认为互斥
if exclusive_ticket_map[ticket_type].get(active_ticket_type, True):
if exclusive_ticket_map.get(ticket_type, {}).get(active_ticket_type, True):
exclusive_infos.append({"exclusive_ticket": record.ticket, "root_id": record.flow.flow_obj_id})
return exclusive_infos

Expand Down

0 comments on commit b5215f8

Please sign in to comment.