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

response.__bool__() returns False for Exception cases, so use "is not None" instead #1748

Merged
merged 1 commit into from
Dec 21, 2023

Conversation

brezelman
Copy link
Contributor

@brezelman brezelman commented Oct 25, 2023

If conditions didn't match, because response.__bool__() uses response.ok, which returns False for every http status code >= 400, which is the case here, at least in Jira 9.4.11.

Actual use case: jira_instance.add_user() with ignore_existing=True raised the JiraError Exception, even though it shouldn't.

… None" instead

If conditions didn't match, because response.__bool__() uses response.ok, which returns False for every http status code >= 400, which is the case here, at least in Jira 9.4.11.
@brezelman brezelman temporarily deployed to ack October 25, 2023 10:30 — with GitHub Actions Inactive
@ssbarnea ssbarnea added the bug label Nov 1, 2023
@ssbarnea ssbarnea temporarily deployed to ack November 1, 2023 15:41 — with GitHub Actions Inactive
@adehad adehad merged commit 3df8344 into pycontribs:main Dec 21, 2023
5 checks passed
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.

3 participants