Skip to content

Commit

Permalink
FIX confidence set related errors at results export
Browse files Browse the repository at this point in the history
  • Loading branch information
ElodieENSTA committed Jan 17, 2024
1 parent 48b1419 commit d9e719a
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 d9e719a

Please sign in to comment.