From 3d63950d016c8d4ee9a3c07372389f6386bb5b3a Mon Sep 17 00:00:00 2001 From: Reditus Date: Fri, 15 May 2026 03:23:25 +0100 Subject: [PATCH] Fix map: use class for vehicle names instead of non-existent name column --- app/routes/main.py | 4 ++-- templates/map.html | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/app/routes/main.py b/app/routes/main.py index 340e13f..268f35c 100644 --- a/app/routes/main.py +++ b/app/routes/main.py @@ -472,11 +472,11 @@ def register_routes(app, services, settings): # Get vehicles with coordinates vehicles = db.query(""" - SELECT v.id, v.name, a.map, a.transform, a.class + SELECT v.id, a.map, a.transform, a.class FROM dune.vehicles v JOIN dune.actors a ON v.id = a.id WHERE a.transform IS NOT NULL - ORDER BY a.map, v.name + ORDER BY a.map, a.class """) or [] # Get buildings with coordinates diff --git a/templates/map.html b/templates/map.html index 79889df..b7ff1f0 100644 --- a/templates/map.html +++ b/templates/map.html @@ -211,8 +211,9 @@

Vehicles

{% for v in vehicles %} -
- {{ v.name|truncate(15) }} + {% set vehicle_name = v.class.split('/')[-1].split('.')[0] if v.class else 'Unknown' %} +
+ {{ vehicle_name|truncate(15) }} {{ v.map }}
{% endfor %}