Logical error fixed

When selected_language_code was not a field of `user` table, it was 
never added
This commit is contained in:
Davte
2019-07-20 13:17:15 +02:00
parent 907d27b554
commit ec8a882eba
2 changed files with 3 additions and 3 deletions

View File

@@ -223,8 +223,8 @@ async def _language_button(bot, update, user_record, data):
return
# If database-stored information is not updated, update it
if (
'selected_language_code' in user_record
and data[1] != user_record['selected_language_code']
'selected_language_code' not in user_record
or data[1] != user_record['selected_language_code']
):
with bot.db as db:
db['users'].update(