Skip to content

Commit

Permalink
Merge pull request #2 from JunAishima/fix-hardcoded-comm-proposal-type
Browse files Browse the repository at this point in the history
use correct proposal_type_id for the facility specified
  • Loading branch information
stuartcampbell authored Feb 14, 2025
2 parents 7fe8b62 + a264ead commit 27f3908
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 27f3908

Please sign in to comment.