diff --git a/eoxserver/services/ows/wcs/v20/geteocoverageset.py b/eoxserver/services/ows/wcs/v20/geteocoverageset.py index 8fa8f697b..8b6ebb24e 100644 --- a/eoxserver/services/ows/wcs/v20/geteocoverageset.py +++ b/eoxserver/services/ows/wcs/v20/geteocoverageset.py @@ -255,7 +255,7 @@ def handle(self, request): product__collections__in=collections, **filters ) - ) + ).distinct() # Allow metadata queries on coverage itself or on the # parent product if available @@ -300,9 +300,7 @@ def handle(self, request): Q( # Mosaics within directly referenced Collections mosaic__collections__in=collections ) - ).select_subclasses(models.Coverage, models.Mosaic) - - all_coverages_qs = all_coverages_qs.order_by('identifier') + ).distinct().select_subclasses(models.Coverage, models.Mosaic) # limit coverages according to the number of dataset series offset = decoder.start_index