mirror of
https://github.com/seanmorley15/AdventureLog.git
synced 2025-07-23 14:59:36 +02:00
error
This commit is contained in:
parent
fb75745aab
commit
17b274d598
3 changed files with 8 additions and 4 deletions
|
@ -47,7 +47,7 @@ class TripViewSet(viewsets.ModelViewSet):
|
|||
def get_queryset(self):
|
||||
return Trip.objects.filter(
|
||||
Q(is_public=True) | Q(user_id=self.request.user.id)
|
||||
).prefetch_related(
|
||||
).select_related(
|
||||
Prefetch('adventure_set', queryset=Adventure.objects.filter(
|
||||
Q(is_public=True) | Q(user_id=self.request.user.id)
|
||||
))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue