From 5c75b0a3accf07193e8d8d0b9b125d30f47d2465 Mon Sep 17 00:00:00 2001 From: Kuroshini Date: Mon, 27 Jan 2020 23:24:01 +0300 Subject: [PATCH] localized cities #5 --- apps/location/views/back.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/location/views/back.py b/apps/location/views/back.py index 98556e86..ec8f914c 100644 --- a/apps/location/views/back.py +++ b/apps/location/views/back.py @@ -43,7 +43,7 @@ class CityListCreateView(common.CityViewMixin, generics.ListCreateAPIView): def get_queryset(self): """Overridden method 'get_queryset'.""" - qs = models.City.objects.all().annotate(locale_name=KeyTextTransform(get_current_locale(), 'name_translated'))\ + qs = models.City.objects.all().annotate(locale_name=KeyTextTransform(get_current_locale(), 'name'))\ .order_by('locale_name').with_base_related() if self.request.country_code: qs = qs.by_country_code(self.request.country_code)