diff --git a/jira/client.py b/jira/client.py index 64c3e7406..8578e8a89 100644 --- a/jira/client.py +++ b/jira/client.py @@ -1566,7 +1566,7 @@ def create_issues( # Catching case where none of the issues has been created. # See https://github.com/pycontribs/jira/issues/350 except JIRAError as je: - if je.status_code == 400 and je.response: + if je.status_code == 400 and je.response is not None: raw_issue_json = json.loads(je.response.text) else: raise @@ -4620,7 +4620,7 @@ def add_user( try: self._session.post(url, data=payload) except JIRAError as e: - if e.response: + if e.response is not None: err = e.response.json()["errors"] if ( "username" in err