Skip to content

Commit

Permalink
Update handlers.py
Browse files Browse the repository at this point in the history
  • Loading branch information
annndruha committed Feb 13, 2023
1 parent 99e061c commit a004061
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ async def handler_register(update: Update, context: ContextTypes.DEFAULT_TYPE):
data: TgUser | None = session.query(TgUser).filter(TgUser.tg_id == update.effective_user.id).one_or_none()
if r.json() and data is None:
session.add(TgUser(tg_id=chat_id, surname=surname, number=number))
session.flush()
session.commit()
await context.bot.send_message(chat_id=chat_id, text=ans['val_pass'])
marketing.register(tg_id=chat_id, surname=surname, number=number)
return True
Expand Down

0 comments on commit a004061

Please sign in to comment.