Skip to content

Commit

Permalink
fix(backend): 修复过滤key不存在问题 #7152
Browse files Browse the repository at this point in the history
  • Loading branch information
iSecloud committed Sep 26, 2024
1 parent 70380d7 commit 43fe9ee
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dbm-ui/backend/db_services/mysql/dataclass.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def export_filter_conditions(self):
filter_conditions["cluster_type__in"] = filter_conditions.pop("cluster_type")

# 如果是实例过滤. TODO: 临时给插件支持,后续统一替换成filter_clusters接口
if re.compile(IP_PORT_RE_PATTERN).match(filter_conditions["immute_domain"]):
if re.compile(IP_PORT_RE_PATTERN).match(filter_conditions.get("immute_domain", "")):
ip, port = filter_conditions.pop("immute_domain").split(IP_PORT_DIVIDER)
filter_conditions["storageinstance__machine__ip"] = ip
filter_conditions["storageinstance__port"] = port
Expand Down

0 comments on commit 43fe9ee

Please sign in to comment.