Skip to content
Snippets Groups Projects
Commit 5848bdd9 authored by Nicolas Pope's avatar Nicolas Pope
Browse files

Another SDK fix attempt

parent 53f74c55
No related branches found
No related tags found
1 merge request!316Resolves #343 GUI and Frame Refactor
Pipeline #28536 failed
This commit is part of merge request !316. Comments created here will be created in the context of that merge request.
......@@ -22,6 +22,10 @@ Configurable::Configurable(nlohmann::json &config) : config_(&config) {
LOG(FATAL) << "Configurable json is not an object: " << config;
}
/*if (!config.contains("$id")) {
config["$id"] = "ftl://utu.fi";
}*/
ftl::config::registerConfigurable(this);
}
......
......@@ -276,6 +276,8 @@ static void _indexConfig(json_t &cfg) {
}
ftl::Configurable *ftl::config::find(const std::string &uri) {
if (uri.size() == 0) return nullptr;
std::string actual_uri = uri;
if (uri[0] == '/') {
if (uri.size() == 1) {
......@@ -876,6 +878,10 @@ Configurable *ftl::config::configure(int argc, char **argv, const std::string &r
string root_str = (options.find("root") != options.end()) ? nlohmann::json::parse(options["root"]).get<string>() : root;
cfg_root_str = root_str;
if (!config.contains("$id")) {
config["$id"] = "ftl://utu.fi";
}
if (options.find("id") != options.end()) config["$id"] = nlohmann::json::parse(options["id"]).get<string>();
_indexConfig(config);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment