Skip to content

Commit 282a093

Browse files
committed
add joinedloaded to avoid multiple queries
1 parent 8a3d12f commit 282a093

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

api/src/shared/common/db_utils.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,9 @@ def get_gtfs_feeds_query(
8383

8484
if include_options_for_joinedload:
8585
feed_query = feed_query.options(
86-
contains_eager(Gtfsfeed.gtfsdatasets).joinedload(Gtfsdataset.validation_reports),
86+
contains_eager(Gtfsfeed.gtfsdatasets)
87+
.joinedload(Gtfsdataset.validation_reports)
88+
.joinedload(Validationreport.features),
8789
*get_joinedload_options(),
8890
).order_by(Gtfsfeed.provider, Gtfsfeed.stable_id)
8991

0 commit comments

Comments
 (0)