Enhance promo code creation and management logging

- Added logging for successful promo code creation, improving traceability of actions.
- Updated success message formatting to use a new variable for validity display, enhancing clarity for users.
- Refactored variable names in the promo management handler for better readability and consistency.
This commit is contained in:
machka-pasla
2025-08-06 17:41:58 +03:00
parent 9f7171a5c3
commit d0c09f9e06
2 changed files with 7 additions and 3 deletions
+1 -1
View File
@@ -110,7 +110,7 @@ async def promo_management_handler(callback: types.CallbackQuery, i18n_data: dic
builder = InlineKeyboardBuilder()
for promo in promo_models:
status_emoji, _ = get_promo_status_emoji_and_text(promo, i18n, current_lang)
status_emoji, status_text = get_promo_status_emoji_and_text(promo, i18n, current_lang)
button_text = f"{status_emoji} {promo.code} ({promo.current_activations}/{promo.max_activations})"
builder.row(InlineKeyboardButton(text=button_text, callback_data=f"promo_detail:{promo.promo_code_id}"))