Skip to content

Commit 39cc276

Browse files
committed
add in check
1 parent d98f434 commit 39cc276

File tree

1 file changed

+3
-0
lines changed
  • auth-api/src/auth_api/resources/v1

1 file changed

+3
-0
lines changed

auth-api/src/auth_api/resources/v1/org.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -382,6 +382,9 @@ def get_organization_affiliations(org_id):
382382
def new_affiliation_search(org_id):
383383
"""Get all affiliated entities for the given org by calling into Names and LEAR."""
384384
# get affiliation identifiers and the urls for the source data
385+
org = OrgService.find_by_org_id(org_id, allowed_roles=ALL_ALLOWED_ROLES)
386+
if org is None:
387+
raise BusinessException(Error.DATA_NOT_FOUND, None)
385388
affiliations = AffiliationModel.find_affiliations_by_org_id(org_id)
386389
search_details = AffiliationSearchDetails.from_request_args(request)
387390
affiliations_details_list = asyncio.run(

0 commit comments

Comments
 (0)