Skip to content
Snippets Groups Projects
Commit 4c948d37 authored by Erwan Rouchet's avatar Erwan Rouchet
Browse files

Merge branch 'duplicated-process' into 'master'

Avoid duplicated processes when filtering with unscheduled

Closes #505

See merge request !1039
parents 65a8e932 9c0aa4a0
No related branches found
No related tags found
1 merge request!1039Avoid duplicated processes when filtering with unscheduled
......@@ -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')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment