mirror of
https://github.com/seanmorley15/AdventureLog.git
synced 2025-07-22 22:39:36 +02:00
lodging beta
This commit is contained in:
parent
0ea9f1d73e
commit
87a804dbc2
6 changed files with 69 additions and 7 deletions
|
@ -138,8 +138,9 @@ class AdventureViewSet(viewsets.ModelViewSet):
|
|||
# queryset = Adventure.objects.filter(
|
||||
# Q(is_public=True) | Q(user_id=request.user.id), collection=None
|
||||
# )
|
||||
allowed_types = ['visited', 'planned']
|
||||
queryset = Adventure.objects.filter(
|
||||
Q(user_id=request.user.id)
|
||||
Q(user_id=request.user.id) & Q(type__in=allowed_types)
|
||||
)
|
||||
|
||||
queryset = self.apply_sorting(queryset)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue