fix artisans chosen tags
This commit is contained in:
parent
432873da31
commit
cd194b79bd
|
|
@ -73,7 +73,7 @@ class TagsFilterSet(TagsBaseFilterSet):
|
||||||
|
|
||||||
def by_establishment_type(self, queryset, name, value):
|
def by_establishment_type(self, queryset, name, value):
|
||||||
if value == EstablishmentType.ARTISAN:
|
if value == EstablishmentType.ARTISAN:
|
||||||
qs = models.Tag.objects.filter(index_name__in=settings.ARTISANS_CHOSEN_TAGS)
|
qs = models.Tag.objects.filter(value__in=settings.ARTISANS_CHOSEN_TAGS)
|
||||||
if self.request.country_code and self.request.country_code not in settings.INTERNATIONAL_COUNTRY_CODES:
|
if self.request.country_code and self.request.country_code not in settings.INTERNATIONAL_COUNTRY_CODES:
|
||||||
qs = qs.filter(establishments__address__city__country__code=self.request.country_code).distinct('id')
|
qs = qs.filter(establishments__address__city__country__code=self.request.country_code).distinct('id')
|
||||||
return qs.exclude(establishments__isnull=True)
|
return qs.exclude(establishments__isnull=True)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user