Mercurial > hg > orthanc
diff OrthancServer/Sources/Search/DatabaseLookup.cpp @ 5244:72dfa0ac84eb db-protobuf
lookup for labels in orthanc explorer
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 06 Apr 2023 16:55:55 +0200 |
parents | df39c7583a49 |
children | a7d95f951f8a |
line wrap: on
line diff
--- a/OrthancServer/Sources/Search/DatabaseLookup.cpp Thu Apr 06 16:04:23 2023 +0200 +++ b/OrthancServer/Sources/Search/DatabaseLookup.cpp Thu Apr 06 16:55:55 2023 +0200 @@ -372,12 +372,9 @@ void DatabaseLookup::AddWithLabel(const std::string& label) { - if (label.empty()) + if (!label.empty()) { - throw OrthancException(ErrorCode_ParameterOutOfRange); - } - else - { + ServerToolbox::CheckValidLabel(label); withLabels_.insert(label); } } @@ -385,12 +382,9 @@ void DatabaseLookup::AddWithoutLabel(const std::string& label) { - if (label.empty()) + if (!label.empty()) { - throw OrthancException(ErrorCode_ParameterOutOfRange); - } - else - { + ServerToolbox::CheckValidLabel(label); withoutLabels_.insert(label); } }