mirror of
https://github.com/nikdoof/test-auth.git
synced 2025-12-14 14:52:15 +00:00
Now checks we have a date before trying to check it
This commit is contained in:
@@ -110,7 +110,7 @@ class CachedDocumentManager(models.Manager):
|
|||||||
# EVE uses UTC.
|
# EVE uses UTC.
|
||||||
current_eve_time = datetime.utcnow()
|
current_eve_time = datetime.utcnow()
|
||||||
|
|
||||||
if not doc or current_eve_time > doc.cached_until:
|
if not doc or not doc.cached_until or current_eve_time > doc.cached_until:
|
||||||
doc = self.cache_from_eve_api(url_path, params)
|
doc = self.cache_from_eve_api(url_path, params)
|
||||||
|
|
||||||
if doc:
|
if doc:
|
||||||
|
|||||||
Reference in New Issue
Block a user