From 607aca4c54560bd728eb0205cc75c3298b96e97c Mon Sep 17 00:00:00 2001 From: Joseph Muller Date: Mon, 19 Aug 2024 15:10:21 +0100 Subject: [PATCH] Prevent duplicates in galley list #166 --- views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/views.py b/views.py index 3189f4200..2ea84acb5 100644 --- a/views.py +++ b/views.py @@ -854,7 +854,7 @@ def typesetting_assignment(request, assignment_id): galleys = core_models.Galley.objects.filter( Q(article=article), (Q(file__files_to_typeset=assignment) | Q(file__owner=request.user)), - ) + ).distinct() supplementary_files = article.supplementary_files.filter( file__pk__in=[file.pk for file in assignment.files_to_typeset.all()],