From 3c118d0d0796029f766c6733bebf019babec8f12 Mon Sep 17 00:00:00 2001 From: HumzahJavid <25638011+HumzahJavid@users.noreply.github.com> Date: Mon, 12 Aug 2024 16:35:10 +0100 Subject: [PATCH] Add print statement to debug PUT results and rename FIA_API_PATH There is discrepancy between these specification files and the existing local DB, it is likely there will be further discrepancies in staging and/or prod --- tools/specification_migration.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tools/specification_migration.py b/tools/specification_migration.py index e1962a4..e496d34 100644 --- a/tools/specification_migration.py +++ b/tools/specification_migration.py @@ -11,7 +11,7 @@ import requests -FIA_API_PATH = sys.argv[1] +FIA_API_URL = sys.argv[1] FIA_API_API_KEY = sys.argv[2] successful_update: int = 200 @@ -28,8 +28,9 @@ json_spec = json.load(specification) response = requests.put( - url=f"{FIA_API_PATH}/instrument/{instrument_name}/specification", + url=f"{FIA_API_URL}/instrument/{instrument_name}/specification", json=json_spec, headers=auth_headers, timeout=2000, ) + print(f"PUT result, {instrument_name} - {response.status_code}") # noqa: T201