[fs2zammad] fix dict access synthax in user lookup
This commit is contained in:
parent
5ca451510f
commit
64218fe9d8
1 changed files with 1 additions and 1 deletions
|
@ -92,7 +92,7 @@ def maybe_create_zammad_user(userdata, zammad_session, attr="login", default=Non
|
||||||
# The use probably exist already...
|
# The use probably exist already...
|
||||||
result = list(zammad.user.search(lowercase_email))
|
result = list(zammad.user.search(lowercase_email))
|
||||||
if len(result) >= 1:
|
if len(result) >= 1:
|
||||||
user = next(u for u in result if u.email == lowercase_email)
|
user = next(u for u in result if u['email'] == lowercase_email)
|
||||||
USERMAP[lowercase_email] = user
|
USERMAP[lowercase_email] = user
|
||||||
else:
|
else:
|
||||||
print(f"Could not create/fetch user {lowercase_email}")
|
print(f"Could not create/fetch user {lowercase_email}")
|
||||||
|
|
Loading…
Reference in a new issue