Skip to content

Commit 417c0ea

Browse files
committed
set deprecated status if set in the csv
1 parent 550743f commit 417c0ea

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

api/src/scripts/populate_db_gtfs.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,10 @@ def populate_db(self, session: "Session", fetch_url: bool = True):
223223
source="mdb",
224224
)
225225
]
226-
226+
# Always set the deprecated status if found in the csv
227+
csv_status = self.get_safe_value(row, "status", "active")
228+
if csv_status.lower() == "deprecated":
229+
feed.status = "deprecated"
227230
# If the is_official field from the CSV is empty, the value here will be None and we don't touch the DB
228231
if is_official_from_csv is not None:
229232
if feed.official != is_official_from_csv:

0 commit comments

Comments
 (0)