Fix bug preventing default from being set to null if already set to an integer.
This commit is contained in:
@@ -1018,9 +1018,10 @@ unsigned int EmbeddedNetworkController::handleControlPlaneHttpPOST(
|
|||||||
json ntag = json::object();
|
json ntag = json::object();
|
||||||
const uint64_t tagId = OSUtils::jsonInt(tag["id"],0ULL);
|
const uint64_t tagId = OSUtils::jsonInt(tag["id"],0ULL);
|
||||||
ntag["id"] = tagId;
|
ntag["id"] = tagId;
|
||||||
if (tag.find("default") == tag.end())
|
json &dfl = tag["default"];
|
||||||
ntag["default"] = json();
|
if (dfl.is_null())
|
||||||
else ntag["default"] = OSUtils::jsonInt(tag["default"],0ULL);
|
ntag["default"] = dfl;
|
||||||
|
else ntag["default"] = OSUtils::jsonInt(dfl,0ULL);
|
||||||
ntags[tagId] = ntag;
|
ntags[tagId] = ntag;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user