From 4795e6cb9f0ecfc52ce3fb459884372ce936c3e2 Mon Sep 17 00:00:00 2001 From: Romulo Quidute Filho Date: Fri, 12 Jan 2024 14:52:29 +0000 Subject: [PATCH] Removed checking for hardcoded fields from DutConfig --- app/api/api_v1/endpoints/projects.py | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/app/api/api_v1/endpoints/projects.py b/app/api/api_v1/endpoints/projects.py index 04f20470..1930ac1b 100644 --- a/app/api/api_v1/endpoints/projects.py +++ b/app/api/api_v1/endpoints/projects.py @@ -28,8 +28,7 @@ from app.pics_applicable_test_cases import applicable_test_cases_list from app.schemas.pics import PICSError from app.schemas.project import Project as Proj - -# from app.schemas.project import ProjectPICSUpdate +from app.schemas.test_environment_config import DutConfig router = APIRouter() @@ -88,13 +87,7 @@ def default_config() -> schemas.TestEnvironmentConfig: def __validate_dut_config(request: Request) -> None: - valid_properties = [ - "discriminator", - "setup_code", - "pairing_mode", - "chip_timeout", - "chip_use_paa_certs", - ] + valid_properties = list(DutConfig.__annotations__.keys()) if "config" in request._json and "dut_config" in request._json["config"]: dut_config = request._json["config"]["dut_config"]