Skip to content

Commit

Permalink
fix: Exception when urlhaus results are invalid
Browse files Browse the repository at this point in the history
  • Loading branch information
Rafiot committed Feb 27, 2025
1 parent ab8b8e2 commit 18a6a45
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion website/web/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1062,7 +1062,7 @@ def modules(tree_uuid: str) -> str | WerkzeugResponse | Response:
# TODO: make a short result
uh = modules_responses.pop('urlhaus')
for url, results in uh['urls'].items():
if results:
if results and 'url' in results:
urlhaus_short_result['urls'].append(results)

urlscan_to_display: dict[str, Any] = {}
Expand Down

0 comments on commit 18a6a45

Please sign in to comment.