fix: Properly check keys in cache

pull/67/head
Raphaël Vinot 2020-02-11 17:26:01 +01:00
parent 794d9745ab
commit 09b3b16910
1 changed files with 1 additions and 1 deletions

View File

@ -89,7 +89,7 @@ class Lookyloo():
if isinstance(report_dir, Path):
report_dir = str(report_dir)
cached = self.redis.hgetall(report_dir)
if all(key in ['uuid', 'title', 'timestamp', 'url', 'redirects'] for key in cached):
if all(key in cached.keys() for key in ['uuid', 'title', 'timestamp', 'url', 'redirects']):
cached['redirects'] = json.loads(cached['redirects'])
return cached