0.12.1 fix form from and to place fields choices

This commit is contained in:
SDE
2024-01-31 14:37:41 +03:00
parent a43de1fa91
commit 3f00ff39d2
3 changed files with 93 additions and 40 deletions

View File

@@ -67,6 +67,8 @@ def edit_route_ajax(request):
route = Route.objects.get(id=data['route_id'])
form = RouteForm(instance=route)
form = routeForm_assign_choices_by_type_transport(form, route.type_transport)
route_address_points_Dict = route.get_address_points()
form.initial.update({
'from_address_point_txt': route_address_points_Dict['from_address_point_txt'],