Skip to content

KeyError during update of media #58

@st31ny

Description

@st31ny

When a user is removed from an LDAP group but orphans are not deleted, the subsequent media update tries to access a user that does not exist:

if self.ldap_conn.get_user_media(ldap_users[each_user], self.ldap_media):

Here, each_user is an element of zabbix_group_users which might contain users who are not present in the LDAP group anymore but have not been deleted before (in

absent_users = set(zabbix_group_users) - set(list(ldap_users.keys()))
).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions