From 9280025f1cde82326a79dad2bdae30b2791ba652 Mon Sep 17 00:00:00 2001 From: SDE Date: Tue, 14 Jan 2025 16:31:18 +0300 Subject: [PATCH] 2.1.15 get_cargo_type_by_transport_type_ajax --- RoutesApp/js_views.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/RoutesApp/js_views.py b/RoutesApp/js_views.py index ad53436..3773417 100644 --- a/RoutesApp/js_views.py +++ b/RoutesApp/js_views.py @@ -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)}'