flake8 fix, server back

This commit is contained in:
mihalin 2021-09-26 20:37:51 +03:00
parent 2e61640f5a
commit ea8d251142
2 changed files with 3 additions and 2 deletions

View File

@ -47,7 +47,7 @@ def main():
loop.run_until_complete(initialization()) loop.run_until_complete(initialization())
loop.create_task(dp.start_polling()) loop.create_task(dp.start_polling())
# loop.create_task(server_main().start()) loop.create_task(server_main().start())
loop.run_forever() loop.run_forever()

View File

@ -99,7 +99,8 @@ async def bot_added(message: types.Message, state: FSMContext):
return await on_unknown_error() return await on_unknown_error()
user, _ = await User.get_or_create(telegram_id=message.from_user.id) user, _ = await User.get_or_create(telegram_id=message.from_user.id)
bot = Bot(token=Bot.encrypted_token(token), owner=user, name=test_bot_info.username, super_chat_id=message.from_user.id) bot = Bot(token=Bot.encrypted_token(token), owner=user, name=test_bot_info.username,
super_chat_id=message.from_user.id)
try: try:
await bot.save() await bot.save()
except IntegrityError: except IntegrityError: