# HG changeset patch # User Sebastien Jodogne # Date 1726241286 -7200 # Node ID f679ae844839eb9f94e438fa11ea1042efbfa220 # Parent 92298bfc5451ee353ad7c610efde05dc0dc060c0 revert change to FindRequest::IsRetrieveOneInstanceMetadataAndAttachments() diff -r 92298bfc5451 -r f679ae844839 OrthancServer/Sources/Database/FindRequest.cpp --- a/OrthancServer/Sources/Database/FindRequest.cpp Fri Sep 13 16:56:48 2024 +0200 +++ b/OrthancServer/Sources/Database/FindRequest.cpp Fri Sep 13 17:28:06 2024 +0200 @@ -261,6 +261,13 @@ bool FindRequest::IsRetrieveOneInstanceMetadataAndAttachments() const { - return retrieveOneInstanceMetadataAndAttachments_; + if (level_ == ResourceType_Instance) + { + throw OrthancException(ErrorCode_BadSequenceOfCalls); + } + else + { + return retrieveOneInstanceMetadataAndAttachments_; + } } }