Skip to content

Commit

Permalink
Use deepcopy for sync
Browse files Browse the repository at this point in the history
  • Loading branch information
coder2020official authored Jul 27, 2024
1 parent 1a47edf commit 2ae6b93
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion telebot/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
# random module to generate random string
import random
import string
import copy

import ssl

Expand Down Expand Up @@ -8749,7 +8750,7 @@ def _run_middlewares_and_handler(self, message, handlers, middlewares, update_ty
logger.error("It is not allowed to pass data and values inside data to the handler. Check your handler: {}".format(handler['function']))
return
else:
data_copy = data.copy()
data_copy = copy.deepcopy(data)
for key in list(data_copy):
# remove data from data_copy if handler does not accept it
if key not in params:
Expand Down

0 comments on commit 2ae6b93

Please sign in to comment.