feat: awaitable entity representations
All checks were successful
Build Docs / changes (push) Successful in 28s
Build Docs / build-docs (push) Has been skipped
Build Docs / deploy-docs (push) Has been skipped

This commit is contained in:
Alexander Kalinovsky
2025-03-08 14:57:09 +07:00
parent 9e9979bf31
commit dd56d3f312
15 changed files with 136 additions and 89 deletions

View File

@@ -54,12 +54,12 @@ async def parameters_menu(
continue
if key.caption_value:
caption = get_callable_str(
caption = await get_callable_str(
callable_str=key.caption_value, descriptor=key, entity=None, value=value
)
else:
if key.caption:
caption = get_callable_str(
caption = await get_callable_str(
callable_str=key.caption, descriptor=key, entity=None, value=value
)
else:
@@ -68,7 +68,7 @@ async def parameters_menu(
if key.type_ is bool:
caption = f"{'【✔︎】' if value else '【 】'} {caption}"
else:
caption = f"{caption}: {get_value_repr(value=value, field_descriptor=key, locale=user.lang)}"
caption = f"{caption}: {await get_value_repr(value=value, field_descriptor=key, locale=user.lang)}"
keyboard_builder.row(
InlineKeyboardButton(