Use shared item axis context in role routes
This commit is contained in:
@@ -108,6 +108,19 @@ def action_context_text(axis_values: Any) -> str:
|
||||
)
|
||||
|
||||
|
||||
def context_text(*parts: Any, axis_values: Any = None) -> str:
|
||||
text_parts = [clean_text(part) for part in parts if clean_text(part)]
|
||||
text_parts.extend(axis_value_texts(axis_values))
|
||||
return " ".join(part.lower() for part in text_parts if part)
|
||||
|
||||
|
||||
def key_text(axis_values: Any, key: str) -> str:
|
||||
if not isinstance(axis_values, dict):
|
||||
return ""
|
||||
values = value_texts(axis_values.get(key))
|
||||
return values[0].lower() if values else ""
|
||||
|
||||
|
||||
def row_axis_value_texts(
|
||||
row: dict[str, Any],
|
||||
*,
|
||||
|
||||
Reference in New Issue
Block a user