Skip to content

Commit a8d3964

Browse files
fix: update populate script -> feed status only on new feeds (#1133)
1 parent 410091d commit a8d3964

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

api/src/scripts/populate_db_gtfs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,7 @@ def populate_db(self, session: "Session", fetch_url: bool = True):
211211
created_at=datetime.now(pytz.utc),
212212
operational_status="published",
213213
)
214+
feed.status = self.get_safe_value(row, "status", "active")
214215
self.logger.info(f"Creating {feed.__class__.__name__}: {stable_id}")
215216
session.add(feed)
216217
if data_type == "gtfs":
@@ -237,7 +238,6 @@ def populate_db(self, session: "Session", fetch_url: bool = True):
237238
feed.authentication_info_url = self.get_safe_value(row, "urls.authentication_info", "")
238239
feed.api_key_parameter_name = self.get_safe_value(row, "urls.api_key_parameter_name", "")
239240
feed.license_url = self.get_safe_value(row, "urls.license", "")
240-
feed.status = self.get_safe_value(row, "status", "active")
241241
feed.feed_contact_email = self.get_safe_value(row, "feed_contact_email", "")
242242
feed.provider = self.get_safe_value(row, "provider", "")
243243

0 commit comments

Comments
 (0)