diff --git a/arkindex/dataimport/api.py b/arkindex/dataimport/api.py index f87c0d4a28355f9be407be23166c83a1baec9fb1..b72612245aa5e83f8edad2d29f4ad9680139cbf5 100644 --- a/arkindex/dataimport/api.py +++ b/arkindex/dataimport/api.py @@ -167,7 +167,7 @@ class DataImportsList(CorpusACLMixin, ListAPIView): if state == State.Unscheduled: # Handle a workflow with no task as unscheduled state_query |= Q(workflow__tasks__isnull=True) - qs = qs.filter(state_query).exclude(id__in=excluded_imports.values('id')) + qs = qs.filter(state_query).exclude(id__in=excluded_imports.values('id')).distinct() return qs.order_by('-last_task')