Skip to content
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

Merged
merged 5 commits into from
Apr 3, 2019
Merged

Fix find desc (#43, #91) #97

merged 5 commits into from
Apr 3, 2019

Conversation

luisremis
Copy link
Contributor

Fix #43 and #91

@luisremis luisremis added the Bug Indicates unexpected or undesired behaviors label Mar 30, 2019
@luisremis luisremis requested a review from vishakha041 March 30, 2019 00:22
@luisremis luisremis changed the title Fix find desc Fix find desc (#43, #91) Mar 30, 2019
vishakha041
vishakha041 previously approved these changes Apr 2, 2019
Copy link
Contributor

@vishakha041 vishakha041 left a 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) {
Copy link
Contributor

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.

Copy link
Contributor Author

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.

const Json::Value& set_response = json_responses[0];
const Json::Value& set = set_response["entities"][0];

// This properties should always exist
Copy link
Contributor

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)) {
Copy link
Contributor

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?

Copy link
Contributor Author

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.

@luisremis luisremis merged commit f3d3f1c into develop Apr 3, 2019
@luisremis luisremis deleted the fix_findDesc branch May 3, 2019 23:15
cwlacewe added a commit to cwlacewe/vdms that referenced this pull request Apr 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Indicates unexpected or undesired behaviors
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants