Skip to content

Commit

Permalink
comment
Browse files Browse the repository at this point in the history
  • Loading branch information
yairsimantov20 committed Aug 9, 2023
1 parent 7b13867 commit 0441b9f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion port_ocean/config/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,9 @@ def parse_config(
for key, value in config.items():
decamelize_key = decamelize(key)
if isinstance(value, dict):
_type: ModelMetaclass = settings_model.__annotations__[decamelize_key]
# If the value is ModelMetaClass typed then its a nested model, and we need to parse it
# If the value is a dict then we need to decamelize the keys and not recurse into the values
_type = settings_model.__annotations__[decamelize_key]
if isinstance(_type, ModelMetaclass):
existing_data[decamelize_key] = parse_config(
_type, value, existing_data.get(decamelize_key, {})
Expand Down

0 comments on commit 0441b9f

Please sign in to comment.