Skip to content

Commit

Permalink
Merge pull request #206 from SciGaP:empty-dataset-bug
Browse files Browse the repository at this point in the history
Fix issue when Cplex experiment created with null dataset-id
  • Loading branch information
machristie authored Mar 10, 2023
2 parents f5a1d3d + 1b7df7e commit 90542c0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions simccs_maptool/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,10 @@ def experiment_scenario_dir(request, experiment):
request, experiment, "Candidate-Network", input_file=True)
solution = _get_experiment_file(request, experiment, "Cplex-solution")
dataset_id = _get_experiment_value(experiment, "Dataset-id")
# FIXME: users can't specify the dataset id and it has no default, so it may
# not be set but we'll just assume that it is Lower48US
if not dataset_id:
dataset_id = "Lower48US"
with tempfile.TemporaryDirectory() as datasets_basepath:
dataset_dir = datasets.get_dataset_dir(dataset_id)
# Create the scenario directory
Expand Down

0 comments on commit 90542c0

Please sign in to comment.