Skip to content

Commit

Permalink
Fix: ensure SASTs see only explicit returns happening
Browse files Browse the repository at this point in the history
  • Loading branch information
TrueBrain committed Oct 3, 2020
1 parent 2dcb587 commit 22f3ee3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions webclient/api.py
Expand Up @@ -92,11 +92,11 @@ def api_call(method, path, params=None, json=None, session=None, return_errors=F
# have to the caller
pass

if return_errors:
return (None, "API call failed")
else:
if not return_errors:
flask.abort(error_response)

return (None, "API call failed")


def api_get(*args, **kwargs):
return api_call(requests.get, *args, **kwargs)
Expand Down

0 comments on commit 22f3ee3

Please sign in to comment.