Skip to content

Commit 100659f

Browse files
Merge pull request eternnoir#1958 from coder2020official/master
Fix storage not saving data sometimes
2 parents 4ffe0f8 + 7bf87a3 commit 100659f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

telebot/asyncio_storage/redis_storage.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,6 @@ async def save(self, chat_id, user_id, data):
170170
user_id = str(user_id)
171171
if response:
172172
if user_id in response:
173-
response[user_id]['data'] = dict(data, **response[user_id]['data'])
173+
response[user_id]['data'] = data
174174
await self.set_record(chat_id, response)
175175
return True

telebot/storage/redis_storage.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ def save(self, chat_id, user_id, data):
174174
user_id = str(user_id)
175175
if response:
176176
if user_id in response:
177-
response[user_id]['data'] = dict(data, **response[user_id]['data'])
177+
response[user_id]['data'] = data
178178
self.set_record(chat_id, response)
179179
return True
180180

0 commit comments

Comments
 (0)