Skip to content

Commit 4e60a1f

Browse files
committed
updated code
1 parent 9ac2b42 commit 4e60a1f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

api/src/shared/db_models/gtfs_rt_feed_impl.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
from shared.database.database import with_db_session
66
from shared.db_models.feed_impl import FeedImpl
7-
from shared.database_gen.sqlacodegen_models import Gtfsrealtimefeed, Feed as FeedOrm, Entitytype
7+
from shared.database_gen.sqlacodegen_models import Gtfsrealtimefeed, Feed as GtfsFeedOrm, Entitytype
88
from shared.db_models.location_impl import LocationImpl
99
from feeds_gen.models.gtfs_rt_feed import GtfsRTFeed
1010

@@ -30,9 +30,9 @@ def from_orm(cls, feed: Gtfsrealtimefeed | None, db_session: Session) -> GtfsRTF
3030
# gtfs_rt_feed.feed_references = [item.stable_id for item in feed.gtfs_feeds] if feed.gtfs_feeds else []
3131
gtfs_rt_location_ids = {location.id for location in feed.locations}
3232
query = (
33-
db_session.query(FeedOrm)
34-
.filter(FeedOrm.provider == feed.provider, FeedOrm.stable_id != feed.stable_id)
35-
.options(joinedload(FeedOrm.locations))
33+
db_session.query(GtfsFeedOrm)
34+
.filter(GtfsFeedOrm.provider == feed.provider, GtfsFeedOrm.stable_id != feed.stable_id)
35+
.options(joinedload(GtfsFeedOrm.locations))
3636
)
3737

3838
feed_references = []

0 commit comments

Comments
 (0)