2.1.15 get_cargo_type_by_transport_type_ajax

This commit is contained in:
SDE
2025-01-14 16:31:18 +03:00
parent 9666c9dbf4
commit 9280025f1c

View File

@@ -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)}'