1
0
mirror of https://github.com/eternnoir/pyTelegramBotAPI.git synced 2023-08-10 21:12:57 +03:00

Merge pull request #1958 from coder2020official/master

Fix storage not saving data sometimes
This commit is contained in:
_run 2023-04-03 01:01:11 +05:00 committed by GitHub
commit 100659fecd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -170,6 +170,6 @@ class StateRedisStorage(StateStorageBase):
user_id = str(user_id)
if response:
if user_id in response:
response[user_id]['data'] = dict(data, **response[user_id]['data'])
response[user_id]['data'] = data
await self.set_record(chat_id, response)
return True

View File

@ -174,7 +174,7 @@ class StateRedisStorage(StateStorageBase):
user_id = str(user_id)
if response:
if user_id in response:
response[user_id]['data'] = dict(data, **response[user_id]['data'])
response[user_id]['data'] = data
self.set_record(chat_id, response)
return True