Skip to content

Commit

Permalink
fix: handle static model_params for geojson::PropertyMap overload
Browse files Browse the repository at this point in the history
  • Loading branch information
program-- committed Aug 3, 2023
1 parent a879152 commit c7f4cff
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion include/realizations/catchment/Formulation_Manager.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -589,7 +589,8 @@ namespace realization {
void parse_external_model_params(geojson::PropertyMap& model_params, const geojson::Feature catchment_feature) {
geojson::PropertyMap attr {};
for (decltype(auto) param : model_params) {
if (!param.second.has_key("source")) {
// Check for type to short-circuit. If param.second is not an object, `.has_key()` will throw
if (param.second.get_type() != geojson::PropertyType::Object || !param.second.has_key("source")) {
attr.emplace(param.first, param.second);
continue;
}
Expand Down

0 comments on commit c7f4cff

Please sign in to comment.