Skip to content

Commit 344e52f

Browse files
Fix pickle issue with saving data on async
1 parent ec5a3c7 commit 344e52f

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

telebot/asyncio_storage/pickle_storage.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -265,9 +265,9 @@ async def save(
265265
message_thread_id,
266266
bot_id,
267267
)
268-
data = await self._read_from_file()
269-
data[_key]["data"] = data
270-
await self._write_to_file(data)
268+
file_data = await self._read_from_file()
269+
file_data[_key]["data"] = data
270+
await self._write_to_file(file_data)
271271
return True
272272

273273
def __str__(self) -> str:

0 commit comments

Comments
 (0)