Explorar o código

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

Kenny Woodson %!s(int64=9) %!d(string=hai) anos
pai
achega
365f9c5503
Modificáronse 1 ficheiros con 3 adicións e 0 borrados
  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)