fix: filtering capabilities, feat: improve enum i18n
This commit is contained in:
@@ -200,13 +200,14 @@ async def process_field_edit_callback(message: Message | CallbackQuery, **kwargs
|
||||
prev_form_name or "default", entity_descriptor.default_list
|
||||
)
|
||||
|
||||
for filt in prev_form_list.static_filters:
|
||||
if filt.value_type == "const":
|
||||
entity_data[filt.field_name] = filt.value
|
||||
elif len(prev_form_params) > filt.param_index:
|
||||
entity_data[filt.field_name] = prev_form_params[
|
||||
filt.param_index
|
||||
]
|
||||
if prev_form_list.static_filters:
|
||||
for filt in prev_form_list.static_filters:
|
||||
if filt.value_type == "const":
|
||||
entity_data[filt.field_name] = filt.value
|
||||
elif len(prev_form_params) > filt.param_index:
|
||||
entity_data[filt.field_name] = prev_form_params[
|
||||
filt.param_index
|
||||
]
|
||||
|
||||
if (
|
||||
callback_data.context
|
||||
@@ -298,6 +299,9 @@ async def process_field_edit_callback(message: Message | CallbackQuery, **kwargs
|
||||
|
||||
state_data.update(state_data)
|
||||
|
||||
clear_state(state_data=state_data)
|
||||
return await route_callback(message=message, back=False, **kwargs)
|
||||
|
||||
elif callback_data.context in [
|
||||
CommandContext.ENTITY_EDIT,
|
||||
CommandContext.ENTITY_FIELD_EDIT,
|
||||
|
||||
Reference in New Issue
Block a user