|
@@ -445,11 +445,10 @@ class AiServeView(View):
|
|
|
if not ip:
|
|
|
return '未知国家'
|
|
|
ipInfo = CommonService.getIpIpInfo(ip, 'EN')
|
|
|
- country_qs = CountryModel.objects.filter(country_code=ipInfo['country_code']).values('id')
|
|
|
+ country_qs = CountryModel.objects.filter(country_code=ipInfo['country_code']).values('id', 'country_name')
|
|
|
if not country_qs.exists():
|
|
|
- return country_qs[0]['country_name']
|
|
|
- return '未知国家'
|
|
|
-
|
|
|
+ return '未知国家'
|
|
|
+ return country_qs[0]['country_name']
|
|
|
|
|
|
def getAiDataList(self, request_dict, response):
|
|
|
year = request_dict.get('year', None)
|