diff options
author | Jordan Cook <jordan.cook@pioneer.com> | 2022-04-30 13:53:24 -0500 |
---|---|---|
committer | Jordan Cook <jordan.cook@pioneer.com> | 2022-04-30 13:53:24 -0500 |
commit | a300510c4ba087fd41d31c379a9d03e3b80b55aa (patch) | |
tree | b7f025deadfa8fc09f9ec026a024960c1e5e42ad /requests_cache/models | |
parent | cf69e93969f06b85fb447048ef640e31a547df9e (diff) | |
download | requests-cache-a300510c4ba087fd41d31c379a9d03e3b80b55aa.tar.gz |
Fix remove_expired_responses() with SQLite and expire_after=0
Diffstat (limited to 'requests_cache/models')
-rwxr-xr-x | requests_cache/models/response.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/requests_cache/models/response.py b/requests_cache/models/response.py index 9ad3a1a..7d40998 100755 --- a/requests_cache/models/response.py +++ b/requests_cache/models/response.py @@ -146,7 +146,7 @@ class CachedResponse(BaseResponse, RichMixin): def expires_unix(self) -> Optional[int]: """Get expiration time as a Unix timestamp""" seconds = self.expires_delta - return round(time() + seconds) if seconds else None + return round(time() + seconds) if seconds is not None else None @property def next(self) -> Optional[PreparedRequest]: |