Skip to content

Commit

Permalink
Bugfix: Tolerate result being None
Browse files Browse the repository at this point in the history
  • Loading branch information
rayluo committed Mar 22, 2024
1 parent ceccc21 commit 79d9dd3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion identity/web.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ def _get_token_for_user(self, scopes, force_refresh=None):
result = app.acquire_token_silent_with_error(
scopes, account=accounts[0], force_refresh=force_refresh)
self._save_cache(cache) # Cache might be refreshed. Save it.
if result.get("id_token_claims"):
if result and result.get("id_token_claims"):
self._save_user_into_session(result["id_token_claims"])
if result:
return result
Expand Down

0 comments on commit 79d9dd3

Please sign in to comment.