Skip to content

Commit

Permalink
fix(result export): confidence set failed the campaign results export (
Browse files Browse the repository at this point in the history
…#176)

FIX confidence set related errors at results export
  • Loading branch information
ElodieENSTA authored Jan 17, 2024
1 parent 77c294e commit 8cb1255
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion backend/api/views/annotation_campaign.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,10 @@ def report(self, request, pk=None):

for result in results:
confidence_indicator_and_lvl_max = ""
if campaign.confidence_indicator_set is not None:
if (
campaign.confidence_indicator_set is not None
and result.confidence_indicator is not None
):
max_level = campaign.confidence_indicator_set.max_level
confidence_indicator_and_lvl_max = (
f"{result.confidence_indicator.level}/{max_level}"
Expand Down Expand Up @@ -256,6 +259,8 @@ def report(self, request, pk=None):
"",
"",
"",
"",
"",
comment,
]
)
Expand Down

0 comments on commit 8cb1255

Please sign in to comment.