aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--fietsboek/models/user.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/fietsboek/models/user.py b/fietsboek/models/user.py
index d4b5491..3a267d8 100644
--- a/fietsboek/models/user.py
+++ b/fietsboek/models/user.py
@@ -227,7 +227,7 @@ class User(Base):
queries.append(select(Track).where(Track.visibility == Visibility.LOGGED_IN))
# Step 4: Friends' tracks
if user:
- friend_query = user._friend_query()
+ friend_query = user._friend_query().subquery()
friend_ids = select(friend_query.c.id)
queries.append(
select(Track)