Skip to content

Commit

Permalink
fix: group_members
Browse files Browse the repository at this point in the history
Some attributes have become obsolete with the latest GDPR developments.
Avoid client crashes trying to retrieve the members of a group.
  • Loading branch information
nilleb committed May 11, 2021
1 parent bb99305 commit d778b06
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions jira/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -1211,11 +1211,14 @@ def group_members(self, group):

result = {}
for user in r["users"]["items"]:
result[user["key"]] = {
"name": user["name"],
"fullname": user["displayName"],
"email": user.get("emailAddress", "hidden"),
"active": user["active"],
result[user['id']] = {
'name': user.get('name'),
'id': user.get('id'),
'accountId': user.get('accountId'),
'fullname': user.get('displayName'),
'email': user.get('emailAddress', 'hidden'),
'active': user.get('active'),
'timezone': user.get('timezone')
}
return OrderedDict(sorted(result.items(), key=lambda t: t[0]))

Expand Down

0 comments on commit d778b06

Please sign in to comment.