Mercurial > hg > orthanc
comparison OrthancServer/ResourceFinder.cpp @ 1355:28563d910039
cont
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 13 May 2015 13:16:49 +0200 |
parents | 3dd494f201a1 |
children |
comparison
equal
deleted
inserted
replaced
1354:3dd494f201a1 | 1355:28563d910039 |
---|---|
284 | 284 |
285 | 285 |
286 ResourceFinder::ResourceFinder(ServerIndex& index) : | 286 ResourceFinder::ResourceFinder(ServerIndex& index) : |
287 index_(index), | 287 index_(index), |
288 level_(ResourceType_Patient), | 288 level_(ResourceType_Patient), |
289 caseSensitive_(true) | 289 caseSensitive_(true), |
290 nonMainTagsIgnored_(false) | |
290 { | 291 { |
291 } | 292 } |
292 | 293 |
293 | 294 |
294 void ResourceFinder::AddTag(const std::string& tag, | 295 void ResourceFinder::AddTag(const std::string& tag, |
359 if (level_ == ResourceType_Instance) | 360 if (level_ == ResourceType_Instance) |
360 { | 361 { |
361 ApplyAtLevel(candidates, ResourceType_Instance); | 362 ApplyAtLevel(candidates, ResourceType_Instance); |
362 } | 363 } |
363 | 364 |
364 if (!query_.empty()) | 365 if (!nonMainTagsIgnored_ && |
366 !query_.empty()) | |
365 { | 367 { |
366 LOG(ERROR) << "Invalid query: Searching against a tag that is not valid for the requested level"; | 368 LOG(ERROR) << "Invalid query: Searching against a tag that is not valid for the requested level"; |
367 throw OrthancException(ErrorCode_BadRequest); | 369 throw OrthancException(ErrorCode_BadRequest); |
368 } | 370 } |
369 | 371 |