File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed
Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change 22from datetime import datetime
33from typing import Type
44
5+ from sqlalchemy import and_
6+ from sqlalchemy .orm import Session , joinedload
7+ from sqlalchemy .orm .query import Query
8+
59from shared .database_gen .sqlacodegen_models import (
610 Feed ,
711 Gtfsrealtimefeed ,
1014 Gtfsdataset ,
1115 Validationreport ,
1216)
13- from sqlalchemy import and_
14- from sqlalchemy .orm import Session , joinedload
15- from sqlalchemy .orm .query import Query
1617
1718feed_mapping = {"gtfs_rt" : Gtfsrealtimefeed , "gtfs" : Gtfsfeed , "gbfs" : Gbfsfeed }
1819
@@ -109,6 +110,10 @@ def get_feeds_query(
109110
110111 conditions = []
111112
113+ if data_type is None :
114+ conditions .append (model .data_type .in_ (["gtfs" , "gtfs_rt" ]))
115+ logging .info ("Added filter to exclude gbfs feeds" )
116+
112117 if operation_status :
113118 conditions .append (model .operational_status == operation_status )
114119 logging .info ("Added operational_status filter: %s" , operation_status )
You can’t perform that action at this time.
0 commit comments