Skip to content

Commit

Permalink
fix caching bug in enricher base
Browse files Browse the repository at this point in the history
  • Loading branch information
pudo committed Jul 19, 2023
1 parent 89240ac commit 4250f73
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions nomenklatura/enrich/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def http_get_cached(
msg = "HTTP fetch failed [%s]: %s" % (url, rex)
raise EnrichmentException(msg) from rex
response = resp.text
if cache_days is not None and cache_days > 0:
if cache_days_ > 0:
self.cache.set(url, response)
return response

Expand Down Expand Up @@ -114,7 +114,7 @@ def http_post_json_cached(
msg = "HTTP POST failed [%s]: %s" % (url, rex)
raise EnrichmentException(msg) from rex
resp_data = resp.json()
if cache_days is not None and cache_days > 0:
if cache_days_ > 0:
self.cache.set_json(cache_key, resp_data)
return resp_data

Expand Down

0 comments on commit 4250f73

Please sign in to comment.