Now checks we have a date before trying to check it

This commit is contained in:
2010-08-02 12:31:14 +01:00
parent 7ec45712d3
commit 329bec6bc8

View File

@@ -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: