Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LITE-29452 Fix dictonary change error #191

Merged
merged 1 commit into from
Feb 19, 2024

Conversation

bdjilka
Copy link
Contributor

@bdjilka bdjilka commented Feb 19, 2024

No description provided.

@@ -30,7 +31,7 @@ def get_method_name(self, task_data, argument):
return self.handler.events[task_data.input.event_type]['method']

async def get_argument(self, task_data):
return task_data.input.data
return copy.copy(task_data.input.data)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[SOL-A] copy.copy does a shallow copy. This approach will not fix the problem in the case of deep objects.

It looks like deepcopy is more appropriate here.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[COD-B] Let's cover this with tests

@bdjilka bdjilka force-pushed the bugfix/LITE-29452-dictionary-changed-error branch from 7d4a125 to 0c2c65b Compare February 19, 2024 15:49
@zzzevaka zzzevaka merged commit 9875c9a into master Feb 19, 2024
4 checks passed
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants