mirror of https://github.com/CIRCL/lookyloo
fix: Avoid exception on broken captures
parent
df4a37ea12
commit
159d444b20
|
@ -470,7 +470,7 @@ def modules(tree_uuid: str):
|
|||
@app.route('/tree/<string:tree_uuid>/redirects', methods=['GET'])
|
||||
def redirects(tree_uuid: str):
|
||||
cache = lookyloo.capture_cache(tree_uuid)
|
||||
if not cache:
|
||||
if not cache or not hasattr(cache, 'redirects'):
|
||||
return Response('Not available.', mimetype='text/text')
|
||||
if not cache.redirects:
|
||||
return Response('No redirects.', mimetype='text/text')
|
||||
|
|
Loading…
Reference in New Issue