From 9ff2bf8157d937caad60881ba5ed04d688cc4902 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Vinot?= Date: Fri, 13 Aug 2021 16:24:34 +0200 Subject: [PATCH] fix: avoid exception if submission is missing --- website/web/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/web/__init__.py b/website/web/__init__.py index e2b24b5..9eb4f05 100644 --- a/website/web/__init__.py +++ b/website/web/__init__.py @@ -396,7 +396,7 @@ def modules(tree_uuid: str): if 'urlscan' in modules_responses: urlscan = modules_responses.pop('urlscan') urlscan_to_display = {'permaurl': '', 'malicious': False, 'tags': []} - if urlscan['submission'].get('result'): + if urlscan['submission'] and urlscan['submission'].get('result'): urlscan_to_display['permaurl'] = urlscan['submission']['result'] if urlscan['result']: # We have a result available, get the verdicts