diff --git a/st2common/st2common/util/config_loader.py b/st2common/st2common/util/config_loader.py index bdc6634d2b..793df93482 100644 --- a/st2common/st2common/util/config_loader.py +++ b/st2common/st2common/util/config_loader.py @@ -96,7 +96,9 @@ def _get_values_for_config(self, config_schema_db, config_db): # If config_schema is available we do a second pass and set default values for required # items which values are not provided / available in the config itself - config = self._assign_subschema_default_values(schema=schema_values, instance=config) + config = self._assign_subschema_default_values( + schema=schema_values, instance=config + ) return config @staticmethod @@ -342,16 +344,10 @@ def _assign_default_values(self, schema, instance, can_replace_instance=False): if schema_type == "object": has_properties = schema.get("properties", None) has_pattern_properties = schema.get("patternProperties", None) - has_additional_properties = schema.get( - "additionalProperties", None - ) + has_additional_properties = schema.get("additionalProperties", None) # Inspect nested object properties - if ( - has_properties - or has_pattern_properties - or has_additional_properties - ): + if has_properties or has_pattern_properties or has_additional_properties: if not instance: instance = {}