Skip to content

Commit

Permalink
fix CI
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinBelthle committed Feb 10, 2025
1 parent 09ca5bd commit bd33aa7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/antares/craft/service/api_services/services/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,10 +124,10 @@ def read_study_settings_api(base_url: str, study_id: str, wrapper: RequestWrappe
optimization_url = f"{settings_base_url}/optimization/form"
response = wrapper.get(optimization_url)
json_response = response.json()
export_mps_value = json_response["exportMps"]
if export_mps_value:
export_mps_value = json_response.get("exportMps", None)
if export_mps_value is True:
json_response["exportMps"] = ExportMPS.TRUE
elif not export_mps_value:
elif export_mps_value is False:
json_response["exportMps"] = ExportMPS.FALSE
optimization_api_model = OptimizationParametersAPI.model_validate(json_response)
optimization_parameters = optimization_api_model.to_user_model()
Expand Down

0 comments on commit bd33aa7

Please sign in to comment.