fix find routes
This commit is contained in:
SDE
2023-11-30 14:24:50 +03:00
parent 7547d2cb89
commit aa492f6ca4
4 changed files with 7 additions and 5 deletions

View File

@@ -143,8 +143,10 @@ def find_routes_ajax(request):
if 'errors' in routes_Dict:
return JsonResponse(routes_Dict, status=400)
html = render_to_string('blocks/b_search_routes.html', routes_Dict, request=request)
if routes_Dict['routes']:
html = render_to_string('blocks/b_search_routes.html', routes_Dict, request=request)
else:
html = render_to_string('templates_js_translate/not_found_find_routes.html', routes_Dict, request=request)
res_Dict = {
'html': html,