Skip to content

Commit

Permalink
use correct proposal_type_id for the facility specified
Browse files Browse the repository at this point in the history
 * remove hard-coded NSLS-II commissioning proposal type ID
  • Loading branch information
JunAishima committed Feb 12, 2025
1 parent 7fe8b62 commit a264ead
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/nsls2api/services/pass_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,9 +149,8 @@ async def get_commissioning_proposals_by_year(
error_message: str = f"Facility {facility_name} does not have a PASS ID."
logger.error(error_message)
raise PassException(error_message)

# The PASS ID for commissioning proposals is 300005
url = f"{base_url}/Proposal/GetProposalsByType/{api_key}/{pass_facility}/{year}/300005/NULL"
pass_commissioning_type = await get_commissioning_proposal_type(facility_name)
url = f"{base_url}/Proposal/GetProposalsByType/{api_key}/{pass_facility}/{year}/{pass_commissioning_type.pass_id}/NULL"

try:
pass_commissioning_proposals = await _call_pass_webservice(url)
Expand Down

0 comments on commit a264ead

Please sign in to comment.