[Fix] Implement legacy PFASConfidence object construction (#404)

Co-authored-by: Tim Lorsbach <tim@lorsba.ch>
Reviewed-on: enviPath/enviPy#404
This commit is contained in:
2026-05-28 23:57:34 +12:00
parent c9b643fe6e
commit 20fd949dfd

View File

@ -125,6 +125,7 @@ from envipy_additional_information.parsers import (
LiquidMatrixSourceParser, LiquidMatrixSourceParser,
OxygenUptakeRateParser, OxygenUptakeRateParser,
InitiatingOrganismParser, InitiatingOrganismParser,
PFASConfidenceParser,
) )
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)
@ -673,7 +674,8 @@ def build_additional_information_from_request(request, type_):
elif type_ == "studywst": elif type_ == "studywst":
# study_wst_cond = get_parameter(request, "studywstcond") # study_wst_cond = get_parameter(request, "studywstcond")
raise ValueError("studywstcond is not yet implemented") raise ValueError("studywstcond is not yet implemented")
elif type_ == "pfasconfidence":
return PFASConfidenceParser.from_string(get_parameter(request, "level"))
else: else:
raise ValueError(f"No corresponding AdditionalInformation for {type_} found!") raise ValueError(f"No corresponding AdditionalInformation for {type_} found!")