Skip to content

Utils

flowtask.components.Workday.utils

ensure_list

ensure_list(val)

Convert a potentially singular value to a list.

extract_by_type

extract_by_type(ids, desired_type)

Given a list of {'_value_1':…, 'type':…} dicts (or a single dict), return the _value_1 whose type matches desired_type, or None.

first

first(v)

Helper to get first item of a list or dict, or empty dict if neither.

safe_serialize

safe_serialize(val)

Serialize Decimal, list or dict into JSON-friendly string, or return empty string if None.

utils

ensure_list

ensure_list(val)

Convert a potentially singular value to a list.

extract_by_type

extract_by_type(ids, desired_type)

Given a list of {'_value_1':…, 'type':…} dicts (or a single dict), return the _value_1 whose type matches desired_type, or None.

extract_nested

extract_nested(data, path)

Helper to extract nested data from a dict given a list of keys.

first

first(v)

Helper to get first item of a list or dict, or empty dict if neither.

safe_serialize

safe_serialize(val)

Serialize Decimal, list or dict into JSON-friendly string, or return empty string if None.