From 14c12cbd1f480991d2a7939d1c7538c33b528ffb Mon Sep 17 00:00:00 2001 From: Shekar V Date: Sat, 25 May 2024 18:37:03 -0400 Subject: [PATCH] Fixed bug due to NSLS 2 API change --- gui/dewar_tree.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gui/dewar_tree.py b/gui/dewar_tree.py index 79657c36..6efd1760 100644 --- a/gui/dewar_tree.py +++ b/gui/dewar_tree.py @@ -274,9 +274,9 @@ def add_samples_to_puck_tree( def is_proposal_member(self, proposal_id) -> bool: # Check if the user running LSDC is part of the sample's proposal if proposal_id not in self.proposal_membership: - r = requests.get(f"{os.environ['NSLS2_API_URL']}/proposal/{proposal_id}") + r = requests.get(f"{os.environ['NSLS2_API_URL']}/v1/proposal/{proposal_id}") r.raise_for_status() - response = r.json() + response = r.json()['proposal'] if "users" in response and getpass.getuser() in [ user["username"] for user in response["users"] if "username" in user ]: