diff --git a/apps/tag/services/tag_distribution_services.py b/apps/tag/services/tag_distribution_services.py index 92cba0f..27a81f6 100644 --- a/apps/tag/services/tag_distribution_services.py +++ b/apps/tag/services/tag_distribution_services.py @@ -158,7 +158,9 @@ class TagDistributionService: is_closed = False if is_closed == 'false' else True if org.type.key == 'ADM': - distributions_batch = TagDistributionBatch.objects.prefetch_related('distributions') + distributions_batch = TagDistributionBatch.objects.prefetch_related( + 'distributions' + ).filter(is_closed=is_closed) else: distributions_batch = TagDistributionBatch.objects.filter( Q(assigner_org=org) |