Browse Source

获取apn配置接口 排序

linhaohong 8 months ago
parent
commit
1f2d6c3b52
1 changed files with 2 additions and 1 deletions
  1. 2 1
      Controller/UserDevice/APNConfigController.py

+ 2 - 1
Controller/UserDevice/APNConfigController.py

@@ -69,7 +69,8 @@ class APNConfigView(View):
             language = LanguageModel.objects.filter(lang='en').first()
 
         # 查询tb_country_language和tb_country,获取国家名称和国家iso2代码
-        countries = CountryLanguageModel.objects.filter(language=language).select_related('country')
+        countries = CountryLanguageModel.objects.filter(language=language).select_related('country').order_by(
+            'country__country_name')
 
         # 返回国家名和对应的 country_code
         country_iso_list = [{