upd get_callable_str async
This commit is contained in:
@@ -197,7 +197,7 @@ async def entity_list(
|
||||
caption = entity_descriptor.item_repr(entity_descriptor, item)
|
||||
elif entity_descriptor.full_name:
|
||||
caption = f"{
|
||||
get_callable_str(
|
||||
await get_callable_str(
|
||||
callable_str=entity_descriptor.full_name,
|
||||
descriptor=entity_descriptor,
|
||||
entity=item,
|
||||
@@ -228,7 +228,7 @@ async def entity_list(
|
||||
)
|
||||
|
||||
if form_list.filtering and form_list.filtering_fields:
|
||||
add_filter_controls(
|
||||
await add_filter_controls(
|
||||
keyboard_builder=keyboard_builder,
|
||||
entity_descriptor=entity_descriptor,
|
||||
filter=entity_filter,
|
||||
@@ -245,17 +245,17 @@ async def entity_list(
|
||||
)
|
||||
|
||||
if form_list.caption:
|
||||
entity_text = get_callable_str(form_list.caption, entity_descriptor)
|
||||
entity_text = await get_callable_str(form_list.caption, entity_descriptor)
|
||||
else:
|
||||
if entity_descriptor.full_name_plural:
|
||||
entity_text = get_callable_str(
|
||||
entity_text = await get_callable_str(
|
||||
entity_descriptor.full_name_plural, entity_descriptor
|
||||
)
|
||||
else:
|
||||
entity_text = entity_descriptor.name
|
||||
|
||||
if entity_descriptor.description:
|
||||
entity_text = f"{entity_text} {get_callable_str(entity_descriptor.description, entity_descriptor)}"
|
||||
entity_text = f"{entity_text} {await get_callable_str(entity_descriptor.description, entity_descriptor)}"
|
||||
|
||||
state: FSMContext = kwargs["state"]
|
||||
state_data = kwargs["state_data"]
|
||||
|
||||
Reference in New Issue
Block a user