Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/pycamp_bot/commands/projects.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -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()
Expand All @@ -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()
Expand Down