Skip to content

Commit

Permalink
check falsey, not None
Browse files Browse the repository at this point in the history
  • Loading branch information
NodeJSmith committed Jan 7, 2025
1 parent b7eb1fd commit bf6d55c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/otf_api/auth/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def has_cached_credentials(config: OtfAuthConfig | None = None) -> bool:
bool: True if there are cached credentials, False otherwise.
"""
config = config or OtfAuthConfig()
return config.token_cache.get_cached_data() is not None
return bool(config.token_cache.get_cached_data())

@staticmethod
def from_cache(config: OtfAuthConfig | None = None) -> "OtfTokenAuth":
Expand Down

0 comments on commit bf6d55c

Please sign in to comment.