Skip to content

Commit 99f9545

Browse files
Update simpeg_drivers/params.py
Co-authored-by: domfournier <dominiquef@mirageoscience.com>
1 parent 80da719 commit 99f9545

1 file changed

Lines changed: 3 additions & 8 deletions

File tree

simpeg_drivers/params.py

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -128,15 +128,10 @@ def mesh_cannot_be_rotated(cls, value: Octree):
128128
def out_group_if_none(cls, data) -> SimPEGGroup:
129129
group = data.get("out_group", None)
130130

131-
if isinstance(group, UIJsonGroup):
131+
if isinstance(group, UIJsonGroup | type(None)):
132+
name = cls.title if group is None else group.name
132133
with fetch_active_workspace(data["geoh5"], mode="r+") as geoh5:
133-
group = SimPEGGroup.create(geoh5, name=group.name)
134-
group.metadata = None
135-
136-
elif group is None:
137-
with fetch_active_workspace(data["geoh5"], mode="r+") as geoh5:
138-
group = SimPEGGroup.create(geoh5, name=cls.title)
139-
group.metadata = None
134+
group = SimPEGGroup.create(geoh5, name=name)
140135

141136
data["out_group"] = group
142137

0 commit comments

Comments
 (0)