From b5d3b7b9c784de44321f53dccc151421d82ddc1b Mon Sep 17 00:00:00 2001 From: machka-pasla Date: Thu, 7 Aug 2025 23:55:43 +0300 Subject: [PATCH] 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. --- bot/handlers/admin/promo/manage.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bot/handlers/admin/promo/manage.py b/bot/handlers/admin/promo/manage.py index c83b1d7..25a2270 100644 --- a/bot/handlers/admin/promo/manage.py +++ b/bot/handlers/admin/promo/manage.py @@ -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 _ = 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) prompts = {