diff options
author | Daniel Schadt <kingdread@gmx.de> | 2022-08-13 00:04:20 +0200 |
---|---|---|
committer | Daniel Schadt <kingdread@gmx.de> | 2022-08-13 00:04:20 +0200 |
commit | 3f803b30199d363207e6cb2f4c2a8fb981c02855 (patch) | |
tree | fa097f28844cc65cd2c7842f4ea5e6b0306259da | |
parent | c71663c81f594b992c4d46d2e3136ddd6a9b5a21 (diff) | |
download | fietsboek-3f803b30199d363207e6cb2f4c2a8fb981c02855.tar.gz fietsboek-3f803b30199d363207e6cb2f4c2a8fb981c02855.tar.bz2 fietsboek-3f803b30199d363207e6cb2f4c2a8fb981c02855.zip |
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.
-rw-r--r-- | fietsboek/views/browse.py | 2 |
1 files changed, 1 insertions, 1 deletions
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()) |