diff --git a/nomenclature/codelist.py b/nomenclature/codelist.py index bfaa9214..0283487f 100644 --- a/nomenclature/codelist.py +++ b/nomenclature/codelist.py @@ -7,7 +7,7 @@ import pandas as pd import yaml from pyam import IamDataFrame -from pyam.utils import is_list_like, write_sheet, pattern_match, to_list +from pyam.utils import is_list_like, write_sheet, pattern_match from pydantic import BaseModel, ValidationInfo, field_validator from pydantic_core import PydanticCustomError @@ -622,7 +622,7 @@ def validate_units( (variable, unit, self.mapping[variable].unit) for variable, unit in unit_mapping.items() if variable in self.variables - and unit not in to_list(self.mapping[variable].unit) + and unit not in self.mapping[variable].units ]: lst = [ f"'{v}' - expected: {'one of ' if isinstance(e, list) else ''}"