From f1a8d7013f5ff8c2391cd2db5f96ed36c3d33e82 Mon Sep 17 00:00:00 2001 From: wujiasheng03 Date: Mon, 1 Apr 2024 14:38:34 +0800 Subject: [PATCH 1/4] change patch config update deep level --- lyrebird/config/__init__.py | 6 +++--- lyrebird/version.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lyrebird/config/__init__.py b/lyrebird/config/__init__.py index d95f8f601..a77e1f809 100644 --- a/lyrebird/config/__init__.py +++ b/lyrebird/config/__init__.py @@ -99,11 +99,11 @@ def override_config_field(self, update_conf: dict): forbidden_modify_fields = self.contains_forbidden_modify_field(update_conf) if forbidden_modify_fields: raise ConfigException(f'Config field cannot be modified: {forbidden_modify_fields}') - - self.add_config(update_conf, type='api_patch', apply_now=True) + + update_level = self.config.get('config.update_config.level', 1) logger.debug(f'Need update config fields: {update_conf}') - self.config.update(update_conf) + self.add_config(update_conf, type='api_patch', level=update_level, apply_now=True) logger.debug(f'Update done. config: {self.config}') application.server['event'].publish('config_update', {'config_update' : {'data': update_conf}}) diff --git a/lyrebird/version.py b/lyrebird/version.py index 869b45fc4..835c829fc 100644 --- a/lyrebird/version.py +++ b/lyrebird/version.py @@ -1,3 +1,3 @@ -IVERSION = (2, 25, 4) +IVERSION = (2, 25, 5) VERSION = ".".join(str(i) for i in IVERSION) LYREBIRD = "Lyrebird " + VERSION From 6cfaf84de08d717f98601f493453b3d2b6fd875c Mon Sep 17 00:00:00 2001 From: wujiasheng03 Date: Mon, 1 Apr 2024 14:46:33 +0800 Subject: [PATCH 2/4] delete unused whitespace --- lyrebird/config/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lyrebird/config/__init__.py b/lyrebird/config/__init__.py index a77e1f809..b586ac044 100644 --- a/lyrebird/config/__init__.py +++ b/lyrebird/config/__init__.py @@ -99,7 +99,7 @@ def override_config_field(self, update_conf: dict): forbidden_modify_fields = self.contains_forbidden_modify_field(update_conf) if forbidden_modify_fields: raise ConfigException(f'Config field cannot be modified: {forbidden_modify_fields}') - + d update_level = self.config.get('config.update_config.level', 1) logger.debug(f'Need update config fields: {update_conf}') From c813fd76433bba1a8bac1e08eacb7396d929b1b8 Mon Sep 17 00:00:00 2001 From: wujiasheng03 Date: Mon, 1 Apr 2024 14:47:32 +0800 Subject: [PATCH 3/4] delete unused whitespace --- lyrebird/config/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lyrebird/config/__init__.py b/lyrebird/config/__init__.py index b586ac044..00e82bc13 100644 --- a/lyrebird/config/__init__.py +++ b/lyrebird/config/__init__.py @@ -99,7 +99,7 @@ def override_config_field(self, update_conf: dict): forbidden_modify_fields = self.contains_forbidden_modify_field(update_conf) if forbidden_modify_fields: raise ConfigException(f'Config field cannot be modified: {forbidden_modify_fields}') - d + update_level = self.config.get('config.update_config.level', 1) logger.debug(f'Need update config fields: {update_conf}') From 56b7d2cda96bc418215731893ae0e0d74910ca19 Mon Sep 17 00:00:00 2001 From: wujiasheng03 Date: Mon, 1 Apr 2024 14:48:05 +0800 Subject: [PATCH 4/4] delete unused whitespace --- lyrebird/config/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lyrebird/config/__init__.py b/lyrebird/config/__init__.py index 00e82bc13..03505d3e7 100644 --- a/lyrebird/config/__init__.py +++ b/lyrebird/config/__init__.py @@ -99,7 +99,7 @@ def override_config_field(self, update_conf: dict): forbidden_modify_fields = self.contains_forbidden_modify_field(update_conf) if forbidden_modify_fields: raise ConfigException(f'Config field cannot be modified: {forbidden_modify_fields}') - + update_level = self.config.get('config.update_config.level', 1) logger.debug(f'Need update config fields: {update_conf}')