request_util.py 248 Bytes
Newer Older
lcn's avatar
lcn committed
1 2 3 4 5 6 7 8
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}字段")