2.1.15 change cargo_type and transport_type names
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import copy
|
||||
import json
|
||||
from copy import deepcopy
|
||||
|
||||
@@ -357,9 +358,9 @@ def get_cargo_type_by_transport_type_ajax(request):
|
||||
if not data or not 'type_transport' in data:
|
||||
return JsonResponse({'html': 'недостаточно данных'}, status=400)
|
||||
|
||||
cargo_types = cargo_type_choices
|
||||
cargo_types = copy.deepcopy(cargo_type_choices)
|
||||
if data['type_transport'] in ['avia']:
|
||||
cargo_types = cargo_types[1:]
|
||||
cargo_types = cargo_types[:2] + cargo_types[3:]
|
||||
|
||||
return JsonResponse({'cargo_types': cargo_types})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user