Update promo_edit_field_handler to clarify callback data structure

- Changed the variable name from 'i18n' to 'action' for better readability and understanding of the callback data being processed.
- Ensured that the promo ID and field to edit are still correctly extracted and updated in the state management.
This commit is contained in:
machka-pasla
2025-08-07 23:55:43 +03:00
parent 149ff057a9
commit b5d3b7b9c7
+1 -1
View File
@@ -379,7 +379,7 @@ async def promo_edit_field_handler(callback: types.CallbackQuery, state: FSMCont
if not i18n or not callback.message or not current_lang: return if not i18n or not callback.message or not current_lang: return
_ = lambda key, **kwargs: i18n.gettext(current_lang, key, **kwargs) _ = lambda key, **kwargs: i18n.gettext(current_lang, key, **kwargs)
_, field, promo_id_str = callback.data.split(":") action, field, promo_id_str = callback.data.split(":")
await state.update_data(promo_id=int(promo_id_str), field_to_edit=field) await state.update_data(promo_id=int(promo_id_str), field_to_edit=field)
prompts = { prompts = {