mirror of
https://github.com/flobz/psa_car_controller.git
synced 2026-08-21 17:06:18 +00:00
fix positions url when coordinates are not available in a record
This commit is contained in:
@@ -619,6 +619,8 @@ class MyPSACC:
|
||||
res = conn.execute('SELECT * FROM position ORDER BY Timestamp')
|
||||
features_list = []
|
||||
for row in res:
|
||||
if row["longitude"] is None or row["latitude"] is None:
|
||||
continue
|
||||
feature = Feature(geometry=Point((row["longitude"], row["latitude"])),
|
||||
properties={"vin": row["vin"], "date": row["Timestamp"].strftime("%x %X"),
|
||||
"mileage": row["mileage"],
|
||||
|
||||
Reference in New Issue
Block a user