This commit is contained in:
Kseninia Mikhaylova 2024-08-19 09:24:42 +03:00
parent 63af4b9891
commit 463405b955
1 changed files with 3 additions and 2 deletions

View File

@ -145,7 +145,7 @@ class TgBot:
async def my(self, update: Update, context: CallbackContext): async def my(self, update: Update, context: CallbackContext):
user = update.effective_user user = update.effective_user
current_step = context.chat_data.get("step", None) 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 = [] inv = []
async for e in TgItem.objects.filter(user_id=user.id): async for e in TgItem.objects.filter(user_id=user.id):
@ -297,7 +297,7 @@ class TgBot:
user = update.effective_user user = update.effective_user
current_step = context.chat_data.get("step", None) 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 = [] locations = []
async for e in queryset: async for e in queryset:
@ -412,6 +412,7 @@ class TgBot:
return return
if update.effective_message.text == "/inv": if update.effective_message.text == "/inv":
del context.chat_data["inv"]
context.chat_data["step"] = "name" context.chat_data["step"] = "name"
current_ter_id = context.chat_data.get("terdeep_value", None) current_ter_id = context.chat_data.get("terdeep_value", None)
current_ter = await TerritoryItem.objects.aget(id=current_ter_id) current_ter = await TerritoryItem.objects.aget(id=current_ter_id)