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 authored Apr 27, 2020
1 parent 856d624 commit 8dac820
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 @@ -1207,11 +1207,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 8dac820

Please sign in to comment.