Skip to content

Commit

Permalink
Fix #6525: WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
git-user committed Dec 20, 2023
1 parent 0390d3a commit 4450c61
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
1 change: 0 additions & 1 deletion sirepo/exporter.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ def _create_zip(sim, out_dir, qcall):
d = simulation_db.open_json_file(
sim_obj.simulationType, sid=sim_obj.simulationId, qcall=qcall
)
# TODO (gurhar1133): something better than "related_sim" prefix?
z.writestr(
f"related_sim{idx}.json",
pkjson.dump_pretty(d, pretty=True),
Expand Down
5 changes: 2 additions & 3 deletions sirepo/importer.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ def read_zip(zip_bytes, qcall, sim_type=None):


def _import_related_sims(data, zip_bytes, tmp_dir, qcall=None):
from sirepo import simulation_db, sim_data
from sirepo import simulation_db

with zipfile.ZipFile(six.BytesIO(zip_bytes), "r") as zip_obj:
for i in zip_obj.infolist():
Expand All @@ -122,8 +122,7 @@ def _import_related_sims(data, zip_bytes, tmp_dir, qcall=None):
if "related_sim" in b:
d = simulation_db.json_load(zip_obj.read(i))
d.models.simulation.isExample = False
# TODO: folder needs to be /Omega
d.models.simulation.folder = f"/{d.simulationType.title()}"
d.models.simulation.folder = f"/{data.simulationType.title()}"
s = simulation_db.save_new_simulation(
d,
qcall=qcall,
Expand Down

0 comments on commit 4450c61

Please sign in to comment.