aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Schadt <kingdread@gmx.de>2022-08-13 00:04:20 +0200
committerDaniel Schadt <kingdread@gmx.de>2022-08-13 00:04:20 +0200
commit3f803b30199d363207e6cb2f4c2a8fb981c02855 (patch)
treefa097f28844cc65cd2c7842f4ea5e6b0306259da
parentc71663c81f594b992c4d46d2e3136ddd6a9b5a21 (diff)
downloadfietsboek-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.py2
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())