Mercurial > hg > orthanc
comparison OrthancServer/Sources/Database/FindRequest.cpp @ 5697:f375e9983943 find-refactoring
fix
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Fri, 12 Jul 2024 11:55:27 +0200 |
parents | d0a264b803f1 |
children | 093a8693ba16 |
comparison
equal
deleted
inserted
replaced
5696:0f8b6214308a | 5697:f375e9983943 |
---|---|
32 | 32 |
33 namespace Orthanc | 33 namespace Orthanc |
34 { | 34 { |
35 FindRequest::ParentSpecification& FindRequest::GetParentSpecification(ResourceType level) | 35 FindRequest::ParentSpecification& FindRequest::GetParentSpecification(ResourceType level) |
36 { | 36 { |
37 if (!IsResourceLevelAboveOrEqual(level, level_)) | 37 if (!IsResourceLevelAboveOrEqual(level, level_) || |
38 level == level_) | |
38 { | 39 { |
39 throw OrthancException(ErrorCode_ParameterOutOfRange); | 40 throw OrthancException(ErrorCode_ParameterOutOfRange); |
40 } | 41 } |
41 | 42 |
42 switch (level) | 43 switch (level) |
56 } | 57 } |
57 | 58 |
58 | 59 |
59 FindRequest::ChildrenSpecification& FindRequest::GetChildrenSpecification(ResourceType level) | 60 FindRequest::ChildrenSpecification& FindRequest::GetChildrenSpecification(ResourceType level) |
60 { | 61 { |
61 if (!IsResourceLevelAboveOrEqual(level_, level)) | 62 if (!IsResourceLevelAboveOrEqual(level_, level) || |
63 level == level_) | |
62 { | 64 { |
63 throw OrthancException(ErrorCode_ParameterOutOfRange); | 65 throw OrthancException(ErrorCode_ParameterOutOfRange); |
64 } | 66 } |
65 | 67 |
66 switch (level) | 68 switch (level) |