Skip to content

Commit

Permalink
fix: missing date parameter crash (#48)
Browse files Browse the repository at this point in the history
fixed a crash happening when the date parameter was not provided
the crash was happening even when the date parameter was not required
  • Loading branch information
leo-desbureaux-tellae authored Apr 12, 2022
1 parent e12b00c commit 10d5b03
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 4 deletions.
3 changes: 2 additions & 1 deletion starling_sim/basemodel/parameters/simulation_parameters.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ def __init__(self, parameters, param_schema_path=None):
validate_against_schema(parameters, self.schema)

# change date format from YYYY-MM-DD to YYYYMMDD
parameters["date"] = parameters["date"].replace("-", "")
if "date" in parameters:
parameters["date"] = parameters["date"].replace("-", "")

self._parametersDict = parameters

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
"scenario": "example_nantes",
"limit": 35000,
"seed": 42,
"date": "2019-09-19",
"traces_output": true,
"visualisation_output": true,
"kpi_output": true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
"scenario": "example_nantes",
"limit": 35000,
"seed": 42,
"date": "2019-09-19",
"traces_output": true,
"visualisation_output": true,
"kpi_output": true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
"scenario": "example_nantes",
"limit": 35000,
"seed": 42,
"date": "2019-09-19",
"traces_output": true,
"visualisation_output": true,
"kpi_output": true,
Expand Down

0 comments on commit 10d5b03

Please sign in to comment.