not_found_msg=f"No user email, product locator, or sdm ID found in version {version_id} of request with ID {capability_request_id}. Cannot find user_email information."
returnHTTPNotFound(detail=not_found_msg)
else:
not_found_msg=f"No user email, product locator, or sdm ID found in version {version_id} of request with ID {capability_request_id}. Cannot find user_email information."
not_found_msg=f"Capability request with ID {capability_request_id} not found."
returnHTTPNotFound(detail=not_found_msg)
else:
not_found_msg=f"Capability request with ID {capability_request_id} not found."
returnHTTPNotFound(detail=not_found_msg)
withsubprocess.Popen(
process_call,
stdout=subprocess.PIPE,
)asproject_data:
data=project_data.communicate()[0]
project=json.loads(data)
project_code=project["projectCode"]
withsubprocess.Popen(
["contacts_wrest",project_code],
process_call,
stdout=subprocess.PIPE,
)aswrested_contacts:
contacts=wrested_contacts.communicate()[0]
if"ERROR"incontacts.decode():
err_msg=f"Contact wrester failed for project {project_code}"
returnHTTPPreconditionFailed(err_msg)
email_list=json.loads(contacts.decode())
user_email=email_list
ifisinstance(email_list,list):
user_email=", ".join(email_list)
)asproject_data:
data=project_data.communicate()[0]
project=json.loads(data)
project_code=project["projectCode"]
withsubprocess.Popen(
["contacts_wrest",project_code],
stdout=subprocess.PIPE,
)aswrested_contacts:
contacts=wrested_contacts.communicate()[0]
if"ERROR"incontacts.decode():
err_msg=f"Contact wrester failed for project {project_code}"