Skip to content

Commit

Permalink
Fix pickle issue with saving data on async
Browse files Browse the repository at this point in the history
  • Loading branch information
coder2020official authored Oct 10, 2024
1 parent ec5a3c7 commit 344e52f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions telebot/asyncio_storage/pickle_storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -265,9 +265,9 @@ async def save(
message_thread_id,
bot_id,
)
data = await self._read_from_file()
data[_key]["data"] = data
await self._write_to_file(data)
file_data = await self._read_from_file()
file_data[_key]["data"] = data
await self._write_to_file(file_data)
return True

def __str__(self) -> str:
Expand Down

0 comments on commit 344e52f

Please sign in to comment.