Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KeyError during update of media #58

Open
st31ny opened this issue Feb 2, 2023 · 0 comments
Open

KeyError during update of media #58

st31ny opened this issue Feb 2, 2023 · 0 comments

Comments

@st31ny
Copy link

st31ny commented Feb 2, 2023

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()))
).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant