Skip to content

Commit abb02ba

Browse files
fix: DEV-3303: Fix updating summary on delete annotations (#3115)
1 parent 78d5cf8 commit abb02ba

File tree

1 file changed

+2
-0
lines changed
  • label_studio/data_manager/actions

1 file changed

+2
-0
lines changed

label_studio/data_manager/actions/basic.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,8 @@ def delete_tasks_annotations(project, queryset, **kwargs):
8484
# take only tasks where annotations were deleted
8585
real_task_ids = set(list(annotations.values_list('task__id', flat=True)))
8686
annotations_ids = list(annotations.values('id'))
87+
# remove deleted annotations from project.summary
88+
project.summary.remove_created_annotations_and_labels(annotations)
8789
annotations.delete()
8890
emit_webhooks_for_instance(project.organization, project, WebhookAction.ANNOTATIONS_DELETED, annotations_ids)
8991
start_job_async_or_sync(bulk_update_stats_project_tasks, queryset.filter(is_labeled=True))

0 commit comments

Comments
 (0)