1
0
Fork 0
mirror of https://github.com/seanmorley15/AdventureLog.git synced 2025-07-22 22:39:36 +02:00

lodging beta

This commit is contained in:
Sean Morley 2024-07-27 15:41:26 -04:00
parent 0ea9f1d73e
commit 87a804dbc2
6 changed files with 69 additions and 7 deletions

View file

@ -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)