Skip to content

Commit bcd07e4

Browse files
Manuel83Manuel83
Manuel83
authored and
Manuel83
committed
Put parameter into cache after adding
1 parent c07e3f4 commit bcd07e4

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

modules/core/core.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -251,8 +251,9 @@ def get_config_parameter(self, key, default):
251251
def add_config_parameter(self, name, value, type, description, options=None):
252252
from modules.config import Config
253253
with self.app.app_context():
254-
Config.insert(**{"name":name, "value": value, "type": type, "description": description, "options": options})
255-
254+
c = Config.insert(**{"name":name, "value": value, "type": type, "description": description, "options": options})
255+
if self.cache.get("config") is not None:
256+
self.cache.get("config")[c.name] = c
256257

257258
def clear_cache(self, key, is_array=False):
258259
if is_array:

0 commit comments

Comments
 (0)