changeset 1867:769178f0ab2c

Fix modality worklists server if some fields are null
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 04 Dec 2015 12:45:07 +0100
parents 579bf74f7da1
children c8877965d67d
files NEWS OrthancServer/Search/HierarchicalMatcher.cpp
diffstat 2 files changed, 5 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/NEWS	Thu Dec 03 10:02:16 2015 +0100
+++ b/NEWS	Fri Dec 04 12:45:07 2015 +0100
@@ -1,6 +1,8 @@
 Pending changes in the mainline
 ===============================
 
+* Fix modality worklists server if some fields are null
+
 
 Version 0.9.5 (2015/12/02)
 ==========================
--- a/OrthancServer/Search/HierarchicalMatcher.cpp	Thu Dec 03 10:02:16 2015 +0100
+++ b/OrthancServer/Search/HierarchicalMatcher.cpp	Fri Dec 04 12:45:07 2015 +0100
@@ -123,12 +123,12 @@
         std::auto_ptr<DicomValue> value(FromDcmtkBridge::ConvertLeafElement
                                         (*element, DicomToJsonFlags_None, encoding));
 
-        if (value->IsBinary() ||
-            value->IsNull())
+        if (value->IsBinary())
         {
           throw OrthancException(ErrorCode_BadRequest);
         }
-        else if (value->GetContent().empty())
+        else if (value->IsNull() ||
+                 value->GetContent().empty())
         {
           // This is an universal matcher
           constraints_[tag] = NULL;