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

Use deepcopy for CodedConcept.from_dataset() #205

Merged
merged 1 commit into from
Nov 9, 2022

Conversation

CPBridge
Copy link
Collaborator

@CPBridge CPBridge commented Oct 28, 2022

This is a fix for #203 , @pieper

The issue was because CodedConcept.from_dataset() manually created a new instance of the class, which means that any attributes of the underlying dataset not supported by the CodedConcept class are lost.

I also had to tweak the __eq__ to defer to the superclass implementation as a fallback as this was creating bizarre bugs when trying to serialize the result. Pydicom-level functionality needs to be able to determine equality of a CodedConcept to any other pydicom.Dataset using its own rules.

Might want to do a patch release for this: potentially a nasty one...

@CPBridge CPBridge added the bug Something isn't working label Oct 28, 2022
@pieper
Copy link
Member

pieper commented Oct 28, 2022

Thanks @CPBridge !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants