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

fix: group_members #933

Merged
merged 2 commits into from
May 15, 2021
Merged

fix: group_members #933

merged 2 commits into from
May 15, 2021

Conversation

nilleb
Copy link
Contributor

@nilleb nilleb commented Apr 27, 2020

Some attributes have become obsolete with the latest GDPR developments.
Avoid client crashes trying to retrieve the members of a group.

Without the patch

In [9]: client.group_members("jira-admins")
---------------------------------------------------------------------------
KeyError                                  Traceback (most recent call last)
<ipython-input-9-1f19d7928eeb> in <module>
----> 1 client.group_members("engineering")

~/dev/gitbot/venv/lib/python3.7/site-packages/jira/client.py in group_members(self, group)
   1010         for user in r['users']['items']:
   1011             logging.exception(user)
-> 1012             result[user['key']] = {'name': user['name'],
   1013                                   'id': user['id'],

KeyError: 'name'  

With the patch

In [10]: client.group_members("jira-admins")
[omissis - a list of users]

@LeoIannacone
Copy link

why this is not merged? :/

@nilleb
Copy link
Contributor Author

nilleb commented May 27, 2020

Probably because of #896

@studioj
Copy link
Collaborator

studioj commented May 7, 2021

@nilleb care to merge in the changes from master

And please black your changes. Thx

@studioj studioj closed this May 8, 2021
@studioj studioj reopened this May 8, 2021
Some attributes have become obsolete with the latest GDPR developments.
Avoid client crashes trying to retrieve the members of a group.
@ssbarnea ssbarnea merged commit 0c3e424 into pycontribs:master May 15, 2021
@nilleb nilleb deleted the patch-1 branch May 18, 2021 11:56
@ssbarnea ssbarnea removed the feature label Oct 4, 2021
svermeulen pushed a commit to svermeulen/jira that referenced this pull request Oct 31, 2021
* fix: group_members

Some attributes have become obsolete with the latest GDPR developments.
Avoid client crashes trying to retrieve the members of a group.

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

Successfully merging this pull request may close these issues.

5 participants