Skip to content

Commit

Permalink
Merge pull request #291 from daniel-thom/fix-transform-single-time-se…
Browse files Browse the repository at this point in the history
…ries

Fix bug where transform_single_time_series! fails
  • Loading branch information
jd-lara authored Jul 13, 2022
2 parents 04113c0 + 41bf313 commit 4e517d5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/component.jl
Original file line number Diff line number Diff line change
Expand Up @@ -727,7 +727,7 @@ function get_single_time_series_transformed_parameters(
end
end

throw(ArgumentError("component $(get_name(component)) does not have SingleTimeSeries"))
return
end

function _get_single_time_series_transformed_parameters(
Expand Down
4 changes: 4 additions & 0 deletions src/system_data.jl
Original file line number Diff line number Diff line change
Expand Up @@ -517,6 +517,10 @@ function transform_single_time_series!(
horizon,
interval,
)
if params === nothing
# This component doesn't have SingleTimeSeries.
continue
end
# This will throw if there is another forecast type with conflicting parameters.
check_params_compatibility(data.time_series_params, params)
end
Expand Down

0 comments on commit 4e517d5

Please sign in to comment.