File tree Expand file tree Collapse file tree 1 file changed +3
-11
lines changed
Expand file tree Collapse file tree 1 file changed +3
-11
lines changed Original file line number Diff line number Diff line change @@ -947,13 +947,6 @@ def update_alert_rule(self,
947947 else :
948948 interval_config = alert_rule_config ['pollingInterval' ]
949949
950- # update alert severity if provided
951- if severity is not None :
952- action_config = alert_rule_config ['operations' ][0 ]['actions' ]
953- action_config [0 ]['targetValue' ] = severity
954- else :
955- action_config = alert_rule_config ['operations' ][0 ]['actions' ]
956-
957950 # update tags list if provided
958951 if tags is not None :
959952 if tag_op == "OVERWRITE" :
@@ -984,10 +977,9 @@ def update_alert_rule(self,
984977 # update actions field inside operations payload
985978 operations [0 ]['actions' ].extend (action_configs )
986979
987- else :
988- pass
989- else :
990- pass
980+ # update alert severity if provided
981+ if severity is not None :
982+ operations [0 ]['actions' ][0 ]['targetValue' ] = severity
991983
992984 variables = {
993985 "instance" : {
You can’t perform that action at this time.
0 commit comments