Skip to content

Commit aa11c8e

Browse files
authored
fix(examples): Do not append 'updated via' in restore_alerts example (#147)
Each time you restore alerts "updated via restore_alerts.py" in the description is appended so you get something like: "${DESCRITPION} updated via restore_alerts.py updated via restore_alerts.py updated via restore_alerts.py". This commit removes this part so the description doesn't grow anymore. Signed-off-by: Federico Barcelona <[email protected]>
1 parent 443bbca commit aa11c8e

File tree

1 file changed

+0
-8
lines changed

1 file changed

+0
-8
lines changed

examples/restore_alerts.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -78,17 +78,9 @@
7878
if a['name'] in existing_alerts:
7979
a['id'] = existing_alerts[a['name']]['id']
8080
a['version'] = existing_alerts[a['name']]['version']
81-
if a.get('description') is None:
82-
a['description'] = '(updated via restore_alerts.py)'
83-
else:
84-
a['description'] += ' (updated via restore_alerts.py)'
8581
ok, res = sdclient.update_alert(a)
8682
updated_count += 1
8783
else:
88-
if a.get('description') is None:
89-
a['description'] = '(created via restore_alerts.py)'
90-
else:
91-
a['description'] += ' (created via restore_alerts.py)'
9284
ok, res = sdclient.create_alert(alert_obj=a)
9385
created_count += 1
9486
if not ok:

0 commit comments

Comments
 (0)