Logical error fixed
When selected_language_code was not a field of `user` table, it was never added
This commit is contained in:
parent
907d27b554
commit
ec8a882eba
@ -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"
|
||||||
|
|
||||||
|
@ -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(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user