From 5c6a6005f9ebd9a4f6af857600d1adb64df66cbd Mon Sep 17 00:00:00 2001 From: Kevin de Jong Date: Thu, 10 Jun 2021 17:34:02 +0200 Subject: [PATCH] fix: check if annotations are available in the report checks if annotations are in the generated report before referencing them. --- bitbucket_code_insight_reporter/report.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bitbucket_code_insight_reporter/report.py b/bitbucket_code_insight_reporter/report.py index 8c111be..f2253b4 100644 --- a/bitbucket_code_insight_reporter/report.py +++ b/bitbucket_code_insight_reporter/report.py @@ -112,7 +112,7 @@ def report( print("ERR - Failed to create new Code Insight Report") return 1 - _annotations = _report["annotations"] + _annotations = _report.get("annotations", None) if not _annotations: return 0