Fix a bug in optional json parsing
A small logic error caused bugs in the required-ness of optional params.
In the error case, a bad_request return code would be returned with no
error message. This commit allows the request to suceed unharmed.
Change-Id: I1c1cbaf08e79bc1f52485ae12d73701d74e0e2aa
Signed-off-by: Ed Tanous <ed.tanous@intel.com>
diff --git a/redfish-core/include/utils/json_utils.hpp b/redfish-core/include/utils/json_utils.hpp
index b8195c4..f02fc67 100644
--- a/redfish-core/include/utils/json_utils.hpp
+++ b/redfish-core/include/utils/json_utils.hpp
@@ -140,12 +140,8 @@
item.key(), item.value(), res, handled, key, in...);
}
- if (!handled.all())
- {
- details::handleMissing(handled, res, key, in...);
+ details::handleMissing(handled, res, key, in...);
- return false;
- }
return res.result() == boost::beast::http::status::ok;
}