[FIX] script search class model: hide error for default lambda funct
This commit is contained in:
parent
e65984e13a
commit
97d4717d74
1 changed files with 12 additions and 5 deletions
|
|
@ -156,11 +156,18 @@ def fill_search_field(ast_obj, var_name="", py_filename=""):
|
||||||
# Support -> fields.Date.context_today
|
# Support -> fields.Date.context_today
|
||||||
parent_node = ast_obj
|
parent_node = ast_obj
|
||||||
lst_call_lambda = []
|
lst_call_lambda = []
|
||||||
while hasattr(parent_node, "value"):
|
if hasattr(parent_node, "id"):
|
||||||
lst_call_lambda.insert(0, parent_node.attr)
|
while hasattr(parent_node, "value"):
|
||||||
parent_node = parent_node.value
|
lst_call_lambda.insert(0, parent_node.attr)
|
||||||
lst_call_lambda.insert(0, parent_node.id)
|
parent_node = parent_node.value
|
||||||
result = ".".join(lst_call_lambda)
|
lst_call_lambda.insert(0, parent_node.id)
|
||||||
|
result = ".".join(lst_call_lambda)
|
||||||
|
else:
|
||||||
|
# default=uuid.uuid4().hex
|
||||||
|
_logger.warning(
|
||||||
|
f"Cannot support keyword of variable {var_name} type"
|
||||||
|
f" {ast_obj_type} in filename {py_filename}, because parent_node is type ast.Call."
|
||||||
|
)
|
||||||
elif ast_obj_type is ast.List:
|
elif ast_obj_type is ast.List:
|
||||||
result = [fill_search_field(a, var_name) for a in ast_obj.elts]
|
result = [fill_search_field(a, var_name) for a in ast_obj.elts]
|
||||||
elif ast_obj_type is ast.Dict:
|
elif ast_obj_type is ast.Dict:
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue