From 47cd74d5df4baf0de6f66f772038d25fdb603b19 Mon Sep 17 00:00:00 2001 From: nmaytan Date: Fri, 30 Aug 2024 10:30:05 -0400 Subject: [PATCH] Fix variable names for add_detectors --- src/nsls2api/api/v1/beamline_api.py | 2 +- src/nsls2api/services/beamline_service.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/nsls2api/api/v1/beamline_api.py b/src/nsls2api/api/v1/beamline_api.py index 0ba34b30..1a648a89 100644 --- a/src/nsls2api/api/v1/beamline_api.py +++ b/src/nsls2api/api/v1/beamline_api.py @@ -127,7 +127,7 @@ async def add_or_delete_detector( if deleted_detector is None: raise HTTPException( status_code=404, - detail=f"Detector {detector_name} was not found for beamline {beamline_name}", + detail=f"Detector {detector_name} was not found for beamline {name}", ) changed_detector = deleted_detector diff --git a/src/nsls2api/services/beamline_service.py b/src/nsls2api/services/beamline_service.py index 0edefa71..a6802b34 100644 --- a/src/nsls2api/services/beamline_service.py +++ b/src/nsls2api/services/beamline_service.py @@ -120,7 +120,7 @@ async def add_detector( manufacturer=manufacturer, ) - current_detector_names = (detector.name for detector in beamlines.detectors) + current_detector_names = (detector.name for detector in beamline.detectors) current_directory_names = ( detector.directory_name for detector in beamline.detectors )