mirror of
https://github.com/Manuel83/craftbeerpi3
synced 2026-08-09 18:52:40 +02:00
Put parameter into cache after adding
This commit is contained in:
@@ -251,8 +251,9 @@ class CraftBeerPi(ActorAPI, SensorAPI):
|
||||
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:
|
||||
|
||||
Reference in New Issue
Block a user