Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WATO Tags: fix exception when changing an existing tag ID #338

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion cmk/gui/watolib/tags.py
Expand Up @@ -436,7 +436,7 @@ def _change_host_tags_in_rule(operation, mode, ruleset, rule):

# In case it needs to be replaced with a new value, do it now
if new_tag:
was_negated = isinstance(dict, current_value) and "$ne" in current_value
was_negated = isinstance(current_value, dict) and "$ne" in current_value
new_value = {"$ne": new_tag} if was_negated else new_tag
rule.conditions.host_tags[operation.tag_group_id] = new_value
elif mode == TagCleanupMode.DELETE:
Expand Down