authentik.policies.utils
Policy Utils
def
delete_none_values(dict_: dict[typing.Any, typing.Any]) -> dict[typing.Any, typing.Any]:
7def delete_none_values(dict_: dict[Any, Any]) -> dict[Any, Any]: 8 """Remove any keys from `dict_` that are None.""" 9 new_dict = {} 10 for key, value in dict_.items(): 11 if value is not None: 12 new_dict[key] = value 13 return new_dict
Remove any keys from dict_ that are None.