Skip to content

Commit 74019d0

Browse files
Use deepcopy for async
1 parent 2ae6b93 commit 74019d0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

telebot/async_telebot.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
import string
3333
import random
3434
import ssl
35-
35+
import copy
3636

3737
"""
3838
Module : telebot
@@ -558,7 +558,7 @@ async def _run_middlewares_and_handlers(self, message, handlers, middlewares, up
558558
logger.error("It is not allowed to pass data and values inside data to the handler. Check your handler: {}".format(handler['function']))
559559
return
560560
else:
561-
data_copy = data.copy()
561+
data_copy = copy.deepcopy(data)
562562
for key in list(data_copy):
563563
# remove data from data_copy if handler does not accept it
564564
if key not in params:

0 commit comments

Comments
 (0)