Commit edc9e508 authored by Yannick DAYER's avatar Yannick DAYER

Fix delayed_attributes being loaded into SampleSet

parent bf16514d
Pipeline #50770 passed with stage
in 8 minutes and 1 second
......@@ -16,7 +16,15 @@ def _copy_attributes(sample, parent, kwargs):
"""Copies attributes from a dictionary to self."""
if parent is not None:
for key in parent.__dict__:
if key.startswith("_") or key in SAMPLE_DATA_ATTRS:
if (
key.startswith("_")
or key in SAMPLE_DATA_ATTRS
or (
isinstance(sample, SampleSet)
and getattr(parent, "_delayed_attributes", None) is not None
and key in getattr(parent, "_delayed_attributes", [])
)
):
continue
setattr(sample, key, getattr(parent, key))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment