summaryrefslogtreecommitdiff
path: root/requests_cache/models
diff options
context:
space:
mode:
authorJordan Cook <jordan.cook@pioneer.com>2022-04-30 13:53:24 -0500
committerJordan Cook <jordan.cook@pioneer.com>2022-04-30 13:53:24 -0500
commita300510c4ba087fd41d31c379a9d03e3b80b55aa (patch)
treeb7f025deadfa8fc09f9ec026a024960c1e5e42ad /requests_cache/models
parentcf69e93969f06b85fb447048ef640e31a547df9e (diff)
downloadrequests-cache-a300510c4ba087fd41d31c379a9d03e3b80b55aa.tar.gz
Fix remove_expired_responses() with SQLite and expire_after=0
Diffstat (limited to 'requests_cache/models')
-rwxr-xr-xrequests_cache/models/response.py2
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]: