Mercurial > hg > orthanc
diff OrthancServer/Sources/Database/FindResponse.cpp @ 5667:93dff1fccf36 find-refactoring
recursive descent to the children
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 04 Jul 2024 21:31:48 +0200 |
parents | aa231c18b9d2 |
children | b4c97c51f9db |
line wrap: on
line diff
--- a/OrthancServer/Sources/Database/FindResponse.cpp Thu Jul 04 18:31:54 2024 +0200 +++ b/OrthancServer/Sources/Database/FindResponse.cpp Thu Jul 04 21:31:48 2024 +0200 @@ -531,21 +531,14 @@ { if (request.GetChildrenRetrieveSpecification(levels[i]).IsRetrieveIdentifiers()) { - if (levels[i] != GetChildResourceType(request.GetLevel())) - { - throw OrthancException(ErrorCode_NotImplemented); // TODO-FIND - } - else - { - const std::set<std::string>& ids = GetChildrenIdentifiers(levels[i]); + const std::set<std::string>& ids = GetChildrenIdentifiers(levels[i]); - Json::Value v = Json::arrayValue; - for (std::set<std::string>::const_iterator it = ids.begin(); it != ids.end(); ++it) - { - v.append(*it); - } - target[level]["Identifiers"] = v; + Json::Value v = Json::arrayValue; + for (std::set<std::string>::const_iterator it = ids.begin(); it != ids.end(); ++it) + { + v.append(*it); } + target[level]["Identifiers"] = v; } } }