add sql filter "contains"
This commit is contained in:
@@ -166,12 +166,11 @@ async def entity_item(
|
||||
)
|
||||
|
||||
elif isinstance(button, InlineButton):
|
||||
|
||||
if isinstance(button.inline_button, InlineKeyboardButton):
|
||||
btn_row.append(button.inline_button)
|
||||
elif callable(button.inline_button):
|
||||
btn_row.append(button.inline_button(entity_item))
|
||||
|
||||
|
||||
if btn_row:
|
||||
keyboard_builder.row(*btn_row)
|
||||
|
||||
@@ -238,11 +237,19 @@ async def entity_item(
|
||||
field_caption = get_callable_str(
|
||||
field_descriptor.caption, field_descriptor, entity_item
|
||||
)
|
||||
value = get_value_repr(
|
||||
value=getattr(entity_item, field_descriptor.name),
|
||||
field_descriptor=field_descriptor,
|
||||
locale=user.lang,
|
||||
)
|
||||
if field_descriptor.caption_value:
|
||||
value = get_callable_str(
|
||||
field_descriptor.caption_value,
|
||||
field_descriptor,
|
||||
entity_item,
|
||||
getattr(entity_item, field_descriptor.field_name),
|
||||
)
|
||||
else:
|
||||
value = get_value_repr(
|
||||
value=getattr(entity_item, field_descriptor.field_name),
|
||||
field_descriptor=field_descriptor,
|
||||
locale=user.lang,
|
||||
)
|
||||
item_text += f"\n{field_caption or field_descriptor.name}:{f' <b>{value}</b>' if value else ''}"
|
||||
|
||||
context = pop_navigation_context(navigation_stack)
|
||||
|
||||
Reference in New Issue
Block a user