Browse Source

Fixed user media bug where we would update media when we really wanted to create.

Kenny Woodson 9 năm trước cách đây
mục cha
commit
365f9c5503
1 tập tin đã thay đổi với 3 bổ sung0 xóa
  1. 3 0
      roles/lib_zabbix/library/zbx_user_media.py

+ 3 - 0
roles/lib_zabbix/library/zbx_user_media.py

@@ -260,6 +260,9 @@ def main():
         for user in params['users']:
             diff['users']['userid'] = user['userid']
 
+        # Medias have no real unique key so therefore we need to make it like the incoming user's request
+        diff['medias'] = medias
+
         # We have differences and need to update
         content = zapi.get_content(zbx_class_name, 'updatemedia', diff)