Skip to content

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

Merged
luisremis merged 5 commits intodevelopfrom
fix_findDesc
Apr 3, 2019
Merged

Fix find desc (#43, #91)#97
luisremis merged 5 commits intodevelopfrom
fix_findDesc

Conversation

@luisremis
Copy link
Copy Markdown
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
Copy Markdown
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.


for (auto ent : entities) {
if (ent["_id"].asInt64() == d_id) {
if (ent[VDMS_DESC_ID_PROP].asInt64() == d_id) {
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These...


if (findDesc.isMember("entities")) {

if (get_value<bool>(results, "blob", false)) {
Copy link
Copy Markdown
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
Copy Markdown
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