Skip to content

Commit

Permalink
Merge pull request #394 from Rblp/bugfix/bds
Browse files Browse the repository at this point in the history
Correct request formation as identified in #393
  • Loading branch information
johnlaing authored Sep 5, 2024
2 parents 9315eee + ec7c603 commit 882e546
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/bds.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -266,9 +266,9 @@ Rcpp::List bds_Impl(SEXP con_, std::vector<std::string> securities,
Service refDataService = session->getService(rdsrv.c_str());
Request request = refDataService.createRequest("ReferenceDataRequest");
for (size_t i = 0; i < securities.size(); i++) {
request.getElement(Name{"securities"}).appendValue(Name{securities[i].c_str()});
request.getElement(Name{"securities"}).appendValue(securities[i].c_str());
}
request.getElement(Name{"fields"}).appendValue(Name{field.c_str()});
request.getElement(Name{"fields"}).appendValue(field.c_str());
appendOptionsToRequest(request,options_);
appendOverridesToRequest(request,overrides_);

Expand Down Expand Up @@ -311,9 +311,9 @@ Rcpp::List getPortfolio_Impl(SEXP con_, std::vector<std::string> securities,
Service refDataService = session->getService(rdsrv.c_str());
Request request = refDataService.createRequest("PortfolioDataRequest");
for (size_t i = 0; i < securities.size(); i++) {
request.getElement(Name{"securities"}).appendValue(Name{securities[i].c_str()});
request.getElement(Name{"securities"}).appendValue(securities[i].c_str());
}
request.getElement(Name{"fields"}).appendValue(Name{field.c_str()});
request.getElement(Name{"fields"}).appendValue(field.c_str());
appendOptionsToRequest(request,options_);
appendOverridesToRequest(request,overrides_);

Expand Down

0 comments on commit 882e546

Please sign in to comment.