Skip to content

Commit

Permalink
deepcopy all event
Browse files Browse the repository at this point in the history
  • Loading branch information
noO0ob committed May 20, 2024
1 parent 6359b6a commit 5ae8f10
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lyrebird/db/database_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,9 @@ def _fk_pragma_on_connect(self, dbapi_con, con_record):
def event_receiver(self, event, channel=None, event_id=None):
# event is decoded , which should be encoded when save
# deepcopy to avoid affecting checker running
event = copy.deepcopy(event)
if channel == 'flow':
application.encoders_decoders.encoder_handler(copy.deepcopy(event['flow']))
application.encoders_decoders.encoder_handler(event['flow'])

content = json.dumps(event, ensure_ascii=False)
if isinstance(event, dict):
Expand Down

0 comments on commit 5ae8f10

Please sign in to comment.