Add valid lines to stops
Deploy PBT / deploy (push) Failing after 25s

This commit is contained in:
2026-09-10 22:45:12 +02:00
parent 158311a329
commit 3535ebcba0
9 changed files with 424 additions and 160 deletions
+6
View File
@@ -55,6 +55,12 @@ class Stop(db.Model):
municipality = db.Column(db.String(120))
latitude = db.Column(db.Float, nullable=False)
longitude = db.Column(db.Float, nullable=False)
# ";"-joined line refs serving this stop (e.g. "693" or "S2;U4;WLB"), from
# OSM route relations; empty when unknown. Used by the "Linie" autocomplete.
lines = db.Column(db.String(255), nullable=False, default="")
def line_list(self) -> list[str]:
return [ref for ref in self.lines.split(";") if ref]
__table_args__ = (
db.UniqueConstraint("osm_type", "osm_id", name="uq_stops_osm"),