# HG changeset patch # User Alain Mazy # Date 1730754405 -3600 # Node ID 39996519afcee011f2c61f7a49801c2fa3d1a80b # Parent d1dea8ad74a67b5ce155cfd9feec5691a05f27e3 fix limit/since restrictions diff -r d1dea8ad74a6 -r 39996519afce OrthancServer/Sources/OrthancRestApi/OrthancRestResources.cpp --- a/OrthancServer/Sources/OrthancRestApi/OrthancRestResources.cpp Mon Nov 04 21:51:24 2024 +0100 +++ b/OrthancServer/Sources/OrthancRestApi/OrthancRestResources.cpp Mon Nov 04 22:06:45 2024 +0100 @@ -3389,8 +3389,9 @@ finder.SetDatabaseLimits(context.GetDatabaseLimits(level)); - if ((request.isMember(KEY_LIMIT) || request.isMember(KEY_SINCE)) && - !dicomTagLookup.HasOnlyMainDicomTags()) + if (((request.isMember(KEY_LIMIT) && request[KEY_LIMIT].asInt64() != 0) || + (request.isMember(KEY_SINCE) && request[KEY_SINCE].asInt64() != 0)) && + !dicomTagLookup.HasOnlyMainDicomTags()) { throw OrthancException(ErrorCode_BadRequest, "Unable to use " + std::string(KEY_LIMIT) + " or " + std::string(KEY_SINCE) + " in tools/find when querying tags that are not stored as MainDicomTags in the Database");