diff --git a/.github/workflows/build-and-deploy.yaml b/.github/workflows/build-and-deploy.yaml index 4e03f9add..241b0afec 100644 --- a/.github/workflows/build-and-deploy.yaml +++ b/.github/workflows/build-and-deploy.yaml @@ -18,13 +18,6 @@ jobs: black: false ruff: true - frontend-check: - name: "Frontend Check" - uses: pennlabs/shared-actions/.github/workflows/react-check.yaml@v0.1 - with: - path: frontend - nodeVersion: 20.11.1 - build-backend: name: Build backend runs-on: ubuntu-latest diff --git a/backend/clubs/serializers.py b/backend/clubs/serializers.py index 492ca171d..6c0b588ff 100644 --- a/backend/clubs/serializers.py +++ b/backend/clubs/serializers.py @@ -1008,6 +1008,10 @@ def to_representation(self, instance): and instance.membership_set.filter(person=user).exists() ) if not can_see_pending and not is_member: + if instance.approved is False: + raise serializers.ValidationError( + "This club has been removed from the platform." + ) historical_club = ( instance.history.filter(approved=True) .order_by("-approved_on") diff --git a/backend/clubs/views.py b/backend/clubs/views.py index bce5c749d..d7ed1126c 100644 --- a/backend/clubs/views.py +++ b/backend/clubs/views.py @@ -1149,7 +1149,9 @@ def get_queryset(self): ): return queryset else: - return queryset.filter(Q(approved=True) | Q(ghost=True)) + return queryset.filter( + Q(approved=True) | (Q(ghost=True) & Q(approved=None)) + ) def _has_elevated_view_perms(self, instance): """