diff options
| author | Ed Tanous <ed.tanous@intel.com> | 2018-10-26 11:13:55 -0700 |
|---|---|---|
| committer | Ed Tanous <ed.tanous@intel.com> | 2018-10-31 16:10:16 +0000 |
| commit | a282ac4d47d6af665dcbcbd1b0fe1d5c8ad984ac (patch) | |
| tree | 023c29cd1a7674fbf20dc274dfcbb8e2f42f9fc8 /redfish-core/include | |
| parent | af996fe4d12668d1a096e36e791c49690e54c9bb (diff) | |
| download | bmcweb-a282ac4d47d6af665dcbcbd1b0fe1d5c8ad984ac.tar.gz bmcweb-a282ac4d47d6af665dcbcbd1b0fe1d5c8ad984ac.zip | |
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>
Diffstat (limited to 'redfish-core/include')
| -rw-r--r-- | redfish-core/include/utils/json_utils.hpp | 6 |
1 files changed, 1 insertions, 5 deletions
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 @@ bool readJson(const crow::Request& req, crow::Response& res, const char* key, 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; } |

