Skip to content

Commit

Permalink
Fix: ui_resource: Avoid adding multi meta attributes
Browse files Browse the repository at this point in the history
To avoid adding multi target-role enties for each meta instance
To fix upstream issue #720
  • Loading branch information
liangxin1300 committed Dec 5, 2022
1 parent 9fc6ef1 commit 3eb62ff
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crmsh/ui_resource.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,8 @@ def set_deep_meta_attr_node(target_node, attr, value):
for nvpair in nvpairs:
nvpair.set("value", value)
else:
for n in xmlutil.get_set_nodes(target_node, "meta_attributes", create=True):
xmlutil.set_attr(n, attr, value)
nodes = xmlutil.get_set_nodes(target_node, "meta_attributes", create=True)
xmlutil.set_attr(nodes[0], attr, value)
return True


Expand Down

0 comments on commit 3eb62ff

Please sign in to comment.