From aaea1b8473b0423003534030aa572e613e34fd6c Mon Sep 17 00:00:00 2001 From: Nicolas Pope <nwpope@utu.fi> Date: Wed, 5 Jun 2019 11:22:07 +0300 Subject: [PATCH] Addition check for Configurable in update --- components/common/cpp/src/configuration.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/components/common/cpp/src/configuration.cpp b/components/common/cpp/src/configuration.cpp index 8c6173b08..31f28c309 100644 --- a/components/common/cpp/src/configuration.cpp +++ b/components/common/cpp/src/configuration.cpp @@ -225,6 +225,15 @@ bool ftl::config::update(const std::string &puri, const json_t &value) { return false; } + // If there is an ID it still may be a configurable so check! + if (r["$id"].is_string()) { + Configurable *cfg = find(r["$id"].get<string>()); + if (cfg) { + cfg->set<json_t>(tail, value); + return true; + } + } + r[tail] = value; return true; } -- GitLab