request_util.py 248 Bytes
from pot_libs.utils.exc_util import ParamException


def filed_value_from_list(l: list, filed_name: str):
    for i in l:
        if i.field == filed_name:
            return i.value
    raise ParamException(message=f"没有传{filed_name}字段")