2.1.4 def create_or_change_route_ajax v2
This commit is contained in:
@@ -18,7 +18,7 @@ def search_cities_in_db(search_str):
|
||||
for item in objs_wo_tz:
|
||||
item.get_n_save_timezone()
|
||||
res_data = City.objects.filter(id__in=ids).values(
|
||||
'id', 'name', 'country__name', 'timezone', 'country__flag'
|
||||
'id', 'name', 'country__name', 'timezone', 'country__flag', 'country__short_code'
|
||||
)
|
||||
|
||||
return list(res_data)
|
||||
|
||||
@@ -78,10 +78,11 @@ def get_address_point_ajax(request):
|
||||
return JsonResponse(res_Dict)
|
||||
|
||||
except Exception as e:
|
||||
|
||||
msg = f'ошибка в запросе = {str(e)}'
|
||||
print(msg)
|
||||
errors_Dict = {
|
||||
'errors': {
|
||||
'all__': f'ошибка в запросе = {str(e)}'
|
||||
'all__': msg
|
||||
}
|
||||
}
|
||||
return JsonResponse(errors_Dict, status=400)
|
||||
Reference in New Issue
Block a user