From 463405b955bab6f1330a3c357e2cb783fb7bbee7 Mon Sep 17 00:00:00 2001 From: Kseninia Mikhaylova Date: Mon, 19 Aug 2024 09:24:42 +0300 Subject: [PATCH] Del inv --- back/tgbot/tgbot.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/back/tgbot/tgbot.py b/back/tgbot/tgbot.py index 2f6eb90..7b05da6 100644 --- a/back/tgbot/tgbot.py +++ b/back/tgbot/tgbot.py @@ -145,7 +145,7 @@ class TgBot: async def my(self, update: Update, context: CallbackContext): user = update.effective_user current_step = context.chat_data.get("step", None) - logger.info(f"Step {current_step} from user {user.full_name}") + logger.info(f"Step {current_step} from user {user.full_name} with data {context.chat_data}") inv = [] async for e in TgItem.objects.filter(user_id=user.id): @@ -297,7 +297,7 @@ class TgBot: user = update.effective_user current_step = context.chat_data.get("step", None) - logger.info(f"Step {current_step} from user {user.full_name}") + logger.info(f"Step {current_step} from user {user.full_name} with data {context.chat_data}") locations = [] async for e in queryset: @@ -412,6 +412,7 @@ class TgBot: return if update.effective_message.text == "/inv": + del context.chat_data["inv"] context.chat_data["step"] = "name" current_ter_id = context.chat_data.get("terdeep_value", None) current_ter = await TerritoryItem.objects.aget(id=current_ter_id)