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

@ -14,7 +14,7 @@ __author__ = "Davide Testa"
__email__ = "davide@davte.it" __email__ = "davide@davte.it"
__credits__ = ["Marco Origlia", "Nick Lee @Nickoala"] __credits__ = ["Marco Origlia", "Nick Lee @Nickoala"]
__license__ = "GNU General Public License v3.0" __license__ = "GNU General Public License v3.0"
__version__ = "2.1.19" __version__ = "2.1.20"
__maintainer__ = "Davide Testa" __maintainer__ = "Davide Testa"
__contact__ = "t.me/davte" __contact__ = "t.me/davte"

View File

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