Skip to content

Commit

Permalink
Merge pull request #385 from vshekar/Fix-NSLS2-API-access
Browse files Browse the repository at this point in the history
Fixed bug due to NSLS 2 API change
  • Loading branch information
vshekar authored Jun 3, 2024
2 parents da86bb1 + 14c12cb commit 9c38e77
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions gui/dewar_tree.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
]:
Expand Down

0 comments on commit 9c38e77

Please sign in to comment.