Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion qiskit_experiments/database_service/db_experiment_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -862,7 +862,7 @@ def load(cls, experiment_id: str, service: DatabaseServiceV1) -> "DbExperimentDa
experiment_type=service_data.pop("experiment_type"),
backend=service_data.pop("backend"),
experiment_id=service_data.pop("experiment_id"),
parent_id=service_data.pop("parent_id"),
parent_id=service_data.pop("parent_id", None),
tags=service_data.pop("tags"),
job_ids=service_data.pop("job_ids"),
share_level=service_data.pop("share_level"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,12 @@ def load(cls, experiment_id: str, service: DatabaseServiceV1) -> "CompositeExper
load_class = globals()[comp_class]
load_func = getattr(load_class, "load")
loaded_comp = load_func(comp_id, service)

# Sub-experiments that were saved before parent_id was introduced -
# their parent_id was set to None by the super class load method,
# and has now to be updated to the correct id
loaded_comp._parent_id = expdata.experiment_id

expdata._components.append(loaded_comp)

return expdata
Expand Down