Skip to content
Snippets Groups Projects
Commit d578b1c3 authored by Erwan Rouchet's avatar Erwan Rouchet Committed by Bastien Abadie
Browse files

Prefetch the corpus on DataImports in the Django admin

parent bd6d4b34
No related branches found
No related tags found
1 merge request!1618Prefetch the corpus on DataImports in the Django admin
......@@ -47,7 +47,7 @@ class DataImportAdmin(admin.ModelAdmin):
def get_queryset(self, *args, **kwargs):
return super().get_queryset(*args, **kwargs) \
.prefetch_related('workflow__tasks') \
.prefetch_related('workflow__tasks', 'corpus') \
.annotate(last_run=Max('workflow__tasks__run'))
......
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