From 4238118b3adeb4d7b199165f10c4a09f82ba8374 Mon Sep 17 00:00:00 2001
From: Nicolas Pope <nwpope@utu.fi>
Date: Sat, 25 Jul 2020 19:14:14 +0300
Subject: [PATCH] Yet another fix attempt

---
 components/common/cpp/src/configuration.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/components/common/cpp/src/configuration.cpp b/components/common/cpp/src/configuration.cpp
index 1d4bb01d6..29298043c 100644
--- a/components/common/cpp/src/configuration.cpp
+++ b/components/common/cpp/src/configuration.cpp
@@ -883,10 +883,11 @@ Configurable *ftl::config::configure(int argc, char **argv, const std::string &r
 	config_restore = std::move(ftl::loadJSON(std::string(FTL_LOCAL_CONFIG_ROOT "/")+cfg_root_str+std::string("_session.json")));
 
 	Configurable *rootcfg = nullptr;
-	rootCFG = rootcfg;
 
 	try {
+		if (!config.contains("$id")) config["$id"] = "ftl://utu.fi";
 		rootcfg = create<Configurable>(config);
+		rootCFG = rootcfg;
 		if (root_str.size() > 0) {
 			LOG(INFO) << "Setting root to " << root_str;
 			rootcfg = create<Configurable>(rootcfg, root_str);
-- 
GitLab