diff --git a/website/web/__init__.py b/website/web/__init__.py index c3afeea3..91dc8d91 100644 --- a/website/web/__init__.py +++ b/website/web/__init__.py @@ -470,7 +470,7 @@ def modules(tree_uuid: str): @app.route('/tree//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')