2.1.15 get_cargo_type_by_transport_type_ajax
This commit is contained in:
@@ -357,11 +357,11 @@ def get_cargo_type_by_transport_type_ajax(request):
|
||||
if not data or not 'type_transport' in data:
|
||||
return JsonResponse({'html': 'недостаточно данных'}, status=400)
|
||||
|
||||
cargo_type = cargo_type_choices
|
||||
cargo_types = cargo_type_choices
|
||||
if data['type_transport'] in ['avia']:
|
||||
cargo_type = cargo_type[1:]
|
||||
cargo_types = cargo_types[1:]
|
||||
|
||||
return JsonResponse(cargo_type)
|
||||
return JsonResponse({'cargo_types': cargo_types})
|
||||
|
||||
except Exception as e:
|
||||
msg = f'get_cargo_type_by_transport_type_ajax Exception = {str(e)}'
|
||||
|
||||
Reference in New Issue
Block a user