-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix find desc (#43, #91) #97
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a mismatch in whether blob is true by default. Please fix either the wiki or the code. Rest seems fine with some comments.
@@ -827,7 +844,7 @@ Json::Value FindDescriptor::construct_responses( | |||
bool pass_constraints = false; | |||
|
|||
for (auto ent : entities) { | |||
if (ent["_id"].asInt64() == d_id) { | |||
if (ent[VDMS_DESC_ID_PROP].asInt64() == d_id) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like some cleanup mixed in with the actual changes. Just make sure they aren't numerous enough to warrant a separate commit. Otherwise its ok.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is actually needed here in this commit as the "convertproperties" function (that was doing this translation internally) was moved below.
src/DescriptorsCommand.cc
Outdated
const Json::Value& set_response = json_responses[0]; | ||
const Json::Value& set = set_response["entities"][0]; | ||
|
||
// This properties should always exist |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These...
findDesc = json_responses[1]; | ||
|
||
if (findDesc.isMember("entities")) { | ||
|
||
if (get_value<bool>(results, "blob", false)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Our wiki page says that blob is assumed true by default. Here it seems false is default. Which one needs correction?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Given that descriptors usually are a proxy for retrieving other objects, we decided some time back that the default behavior would be not to return the blob by default. Need a wiki update.
fix hadolint summary
Fix #43 and #91