From 3f803b30199d363207e6cb2f4c2a8fb981c02855 Mon Sep 17 00:00:00 2001 From: Daniel Schadt Date: Sat, 13 Aug 2022 00:04:20 +0200 Subject: fix browse view for uncached tracks By not using an OUTER JOIN, we were missing the tracks that did not have an associated track cache. The filters already deal with this case (by having a IS NULL check), but we need to actually include those rows by using an outer join here. --- fietsboek/views/browse.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fietsboek/views/browse.py b/fietsboek/views/browse.py index 462905f..c01d4f6 100644 --- a/fietsboek/views/browse.py +++ b/fietsboek/views/browse.py @@ -302,7 +302,7 @@ def browse(request): track = aliased(models.Track, models.User.visible_tracks_query(request.identity).subquery()) # Build our query - query = select(track).join(models.TrackCache) + query = select(track).join(models.TrackCache, isouter=True) query = filters.compile(query, track, models.TrackCache) query = query.order_by(track.date_raw.desc()) -- cgit v1.2.3