Skip to content

Commit

Permalink
added parent_ann_id
Browse files Browse the repository at this point in the history
  • Loading branch information
KunalTiwary committed Oct 30, 2024
1 parent e02f05b commit 3c6f941
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
6 changes: 6 additions & 0 deletions backend/projects/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -459,12 +459,18 @@ def export_project_in_place(
else annotation_result
)
uid = a.completed_by.email
try:
p_ann = a.parent_annotation.id
except Exception as e:
p_ann = None
single_dict = {
"user_id": uid,
"annotation_id": a.id,
"annotation_result": annotation_result,
"annotation_type": a.annotation_type,
"annotation_status": a.annotation_status,
"parent_annotation": a.parent_annotation,
"parent_annotation_id": p_ann,
}
complete_result.append(single_dict)
try:
Expand Down
5 changes: 5 additions & 0 deletions backend/projects/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -3712,12 +3712,17 @@ def download(self, request, pk=None, *args, **kwargs):
else annotation_result
)
uid = a.completed_by.email
try:
p_ann = a.parent_annotation.id
except Exception as e:
p_ann = None
single_dict = {
"user_id": uid,
"annotation_id": a.id,
"annotation_result": annotation_result,
"annotation_type": a.annotation_type,
"annotation_status": a.annotation_status,
"parent_annotation_id": p_ann,
}
complete_result.append(single_dict)
if add_notes:
Expand Down

0 comments on commit 3c6f941

Please sign in to comment.