Skip to content

Commit 3b3ecb2

Browse files
author
rob
committed
Merge branch 'develop'
2 parents 93e46f6 + 216c758 commit 3b3ecb2

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

systems/forecast_combine.py

+4-3
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import pandas as pd
44

5+
from syscore.exceptions import missingData
56
from systems.forecast_mapping import map_forecast_value
67
from syscore.genutils import str2Bool
78
from syscore.objects import resolve_function
@@ -955,9 +956,9 @@ def get_raw_fixed_forecast_weights(self, instrument_code: str) -> pd.DataFrame:
955956
def _get_fixed_forecast_weights_as_dict(self, instrument_code: str) -> dict:
956957
config = self.parent.config
957958
# Let's try the config
958-
forecast_weights_config = config.get_element_or_missing_data("forecast_weights")
959-
960-
if forecast_weights_config is missing_data:
959+
try:
960+
forecast_weights_config = config.get_element("forecast_weights")
961+
except missingData:
961962
fixed_weights = self._get_one_over_n_weights(instrument_code)
962963
else:
963964
fixed_weights = _get_fixed_weights_from_config(

0 commit comments

Comments
 (0)