comparison OrthancServer/Sources/Database/Compatibility/GenericFind.cpp @ 5771:4db9f897df58 find-refactoring

fix for DICOMWeb + PG tests
author Alain Mazy <am@orthanc.team>
date Wed, 11 Sep 2024 16:31:11 +0200
parents b7bf515864a2
children 093a8693ba16
comparison
equal deleted inserted replaced
5770:e2771185dad6 5771:4db9f897df58
399 } 399 }
400 } 400 }
401 401
402 if (level != request.GetLevel()) 402 if (level != request.GetLevel())
403 { 403 {
404 throw OrthancException(ErrorCode_DatabasePlugin); 404 throw OrthancException(ErrorCode_UnknownResource, "Wrong resource level for this ID"); // this might happen e.g if you call /instances/... with a series instance id
405 } 405 }
406 406
407 std::unique_ptr<FindResponse::Resource> resource(new FindResponse::Resource(request.GetLevel(), internalId, identifier)); 407 std::unique_ptr<FindResponse::Resource> resource(new FindResponse::Resource(request.GetLevel(), internalId, identifier));
408 408
409 if (request.IsRetrieveParentIdentifier()) 409 if (request.IsRetrieveParentIdentifier())