diff --git a/backend/secfit/diets/views.py b/backend/secfit/diets/views.py index 346d4781def5efddb5d0c90135d3718ac1ecbfbb..86a02ae51b761755749e8887b008a80dbb480c3d 100644 --- a/backend/secfit/diets/views.py +++ b/backend/secfit/diets/views.py @@ -142,10 +142,6 @@ class DietList( def get_queryset(self): qs = Diet.objects.none() if self.request.user: - # A diet should be visible to the requesting user if any of the following hold: - # - The diet has public visibility - # - The owner of the diet is the requesting user - # - The diet has coach visibility and the requesting user is the owner's coach qs = Diet.objects.filter( Q(visibility="PU") | (Q(visibility="CO") & Q(owner__coach=self.request.user))