Skip to content

Commit

Permalink
Fix get_data_derived_from
Browse files Browse the repository at this point in the history
`obj in v.derived_from` uses equality (==) rather than identity (is).
  • Loading branch information
psomhorst committed Oct 9, 2024
1 parent 99d93d8 commit 3fd942a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion eitprocessing/datahandling/datacollection.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ def get_loaded_data(self) -> dict[str, V]:

def get_data_derived_from(self, obj: V) -> dict[str, V]:
"""Return all data that was derived from a specific source."""
return {k: v for k, v in self.items() if obj in v.derived_from}
return {k: v for k, v in self.items() if any(obj is item for item in v.derived_from)}

def get_derived_data(self) -> dict[str, V]:
"""Return all data that was derived from any source."""
Expand Down

0 comments on commit 3fd942a

Please sign in to comment.