Mercurial > hg > orthanc
changeset 5778:f679ae844839 find-refactoring
revert change to FindRequest::IsRetrieveOneInstanceMetadataAndAttachments()
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Fri, 13 Sep 2024 17:28:06 +0200 |
parents | 92298bfc5451 |
children | 35271fc53028 08305e438d65 |
files | OrthancServer/Sources/Database/FindRequest.cpp |
diffstat | 1 files changed, 8 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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_; + } } }