From 76162a4e95fcfa520ca1b183e6b359deca1e7484 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Delfino?= Date: Sat, 22 Mar 2025 14:53:15 -0300 Subject: [PATCH] Fix long project name lenght breaking agrega_repositorio/agregar_grupo --- src/pycamp_bot/commands/projects.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/pycamp_bot/commands/projects.py b/src/pycamp_bot/commands/projects.py index b83e489..8ac8016 100644 --- a/src/pycamp_bot/commands/projects.py +++ b/src/pycamp_bot/commands/projects.py @@ -283,7 +283,7 @@ async def ask_project_name(update, context): keyboard = [] for project in projects: - keyboard.append([InlineKeyboardButton(project.name, callback_data=f"{PROJECT_NAME_PATTERN}:{project.name}")]) + keyboard.append([InlineKeyboardButton(project.name, callback_data=f"{PROJECT_NAME_PATTERN}:{project.id}")]) reply_markup = InlineKeyboardMarkup(keyboard) await context.bot.send_message( @@ -332,7 +332,7 @@ async def add_repository(update, context): username = update.message.from_user.username text = update.message.text - project = Project.select().where(Project.name == current_projects[username]).get() + project = Project.select().where(Project.id == current_projects[username]).get() project.repository_url = text project.save() @@ -349,7 +349,7 @@ async def add_group(update, context): username = update.message.from_user.username text = update.message.text - project = Project.select().where(Project.name == current_projects[username]).get() + project = Project.select().where(Project.id == current_projects[username]).get() project.group_url = text project.save()