Skip to content

Commit

Permalink
Fix Gsr Wharton Route (#238)
Browse files Browse the repository at this point in the history
* fix gsr wharton route

* more robust

* linting
  • Loading branch information
vcai122 authored Jan 26, 2024
1 parent df7b8ee commit 7685df5
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion backend/gsr_booking/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,12 @@ class CheckWharton(APIView):
permission_classes = [IsAuthenticated]

def get(self, request):
return Response({"is_wharton": WhartonGSRBooker.is_wharton(request.user)})
return Response(
{
"is_wharton": request.user.booking_groups.filter(name="Penn Labs").exists()
or WhartonGSRBooker.is_wharton(request.user)
}
)


class Availability(APIView):
Expand Down

0 comments on commit 7685df5

Please sign in to comment.