Skip to content

Commit

Permalink
Put parameter into cache after adding
Browse files Browse the repository at this point in the history
  • Loading branch information
Manuel83 authored and Manuel83 committed Jun 15, 2017
1 parent c07e3f4 commit bcd07e4
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions modules/core/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -251,8 +251,9 @@ def get_config_parameter(self, key, default):
def add_config_parameter(self, name, value, type, description, options=None):
from modules.config import Config
with self.app.app_context():
Config.insert(**{"name":name, "value": value, "type": type, "description": description, "options": options})

c = Config.insert(**{"name":name, "value": value, "type": type, "description": description, "options": options})
if self.cache.get("config") is not None:
self.cache.get("config")[c.name] = c

def clear_cache(self, key, is_array=False):
if is_array:
Expand Down

0 comments on commit bcd07e4

Please sign in to comment.