From 0bc2ba0366a2affa0d13ea261617ddaa12d082bc Mon Sep 17 00:00:00 2001 From: Serena Li <40174697+acrantel@users.noreply.github.com> Date: Sun, 4 Feb 2024 14:54:57 -0500 Subject: [PATCH] =?UTF-8?q?Revert=20"only=20allow=20scrimmages=20against?= =?UTF-8?q?=20reference=20player=20(revert=20later)=E2=80=A6=20(#741)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/siarnaq/api/compete/test_views.py | 2 -- backend/siarnaq/api/compete/views.py | 4 ---- frontend/src/components/scrimmageRequestForm.js | 6 ------ 3 files changed, 12 deletions(-) diff --git a/backend/siarnaq/api/compete/test_views.py b/backend/siarnaq/api/compete/test_views.py index d3e53b1a0..f4aa62ce9 100644 --- a/backend/siarnaq/api/compete/test_views.py +++ b/backend/siarnaq/api/compete/test_views.py @@ -1,7 +1,6 @@ import io import random from datetime import timedelta -from unittest import skip from unittest.mock import mock_open, patch from django.test import TestCase, override_settings @@ -1247,7 +1246,6 @@ def test_my_none(self): self.assertEqual(len(response.json()["results"]), 1) -@skip("Skipping tests for forcing scrimmages against only reference player") class ScrimmageRequestViewSetTestCase(APITransactionTestCase): """Test suite for the Scrimmage Requests API.""" diff --git a/backend/siarnaq/api/compete/views.py b/backend/siarnaq/api/compete/views.py index 1ac26ddaa..9dcd3db62 100644 --- a/backend/siarnaq/api/compete/views.py +++ b/backend/siarnaq/api/compete/views.py @@ -5,7 +5,6 @@ from django.conf import settings from django.db import NotSupportedError, transaction from django.db.models import Exists, OuterRef, Q, Subquery -from django.http import HttpResponseForbidden from django.utils import timezone from drf_spectacular.utils import OpenApiParameter, OpenApiResponse, extend_schema from rest_framework import mixins, status, viewsets @@ -544,9 +543,6 @@ def create(self, request, *, episode_id): serializer = self.get_serializer(data=request.data) serializer.is_valid(raise_exception=True) - if serializer.validated_data["requested_to"].pk != 842: - return HttpResponseForbidden() - if serializer.validated_data["is_ranked"]: active_statuses = { SaturnStatus.CREATED, diff --git a/frontend/src/components/scrimmageRequestForm.js b/frontend/src/components/scrimmageRequestForm.js index 6b39b8bf5..61a7d7665 100644 --- a/frontend/src/components/scrimmageRequestForm.js +++ b/frontend/src/components/scrimmageRequestForm.js @@ -171,12 +171,6 @@ class ScrimmageRequestForm extends Component {
-

- Note: only scrimmage requests against Reference Player are - allowed for now. This restriction is to enable our MIT class's - students to submit their bots to pass the class, and will be - removed after Friday. -