changeset 905:6e2e3e6651d4

fix find_label for MySQL (cont)
author Alain Mazy <am@orthanc.team>
date Tue, 14 Apr 2026 21:07:50 +0200
parents 03968d801f3f
children 47895e9cff74
files Tests/Tests.py
diffstat 1 files changed, 6 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/Tests/Tests.py	Tue Apr 14 15:03:35 2026 +0200
+++ b/Tests/Tests.py	Tue Apr 14 21:07:50 2026 +0200
@@ -10498,7 +10498,9 @@
             # The instance has labels "a" and "b"
             self.assertEqual(1, len(Execute([], 'All')))
             self.assertEqual(1, len(Execute([], 'Any')))
-            if IsOrthancVersionAbove(_REMOTE, 1, 12, 11): # From 1.12.11, 'None' with an empty labels list means "list all resources without any labels"
+            # From 1.12.11, 'None' with an empty labels list means "list all resources without any labels"
+            # But this is currently only implemented in SQLite and PostgreSQL
+            if IsOrthancVersionAbove(_REMOTE, 1, 12, 11) and not HasMySQLIndexPlugin(_REMOTE) and not HasODBCIndexPlugin(_REMOTE): 
                 self.assertEqual(0, len(Execute([], 'None')))
             else:
                 self.assertEqual(1, len(Execute([], 'None')))
@@ -10522,7 +10524,9 @@
             # The instance has label "b"
             self.assertEqual(1, len(Execute([], 'All')))
             self.assertEqual(1, len(Execute([], 'Any')))
-            if IsOrthancVersionAbove(_REMOTE, 1, 12, 11): # From 1.12.11, 'None' with an empty labels list means "list all resources without any labels"
+            # From 1.12.11, 'None' with an empty labels list means "list all resources without any labels"
+            # But this is currently only implemented in SQLite and PostgreSQL
+            if IsOrthancVersionAbove(_REMOTE, 1, 12, 11) and not HasMySQLIndexPlugin(_REMOTE) and not HasODBCIndexPlugin(_REMOTE): 
                 self.assertEqual(0, len(Execute([], 'None')))
             else:
                 self.assertEqual(1, len(Execute([], 'None')))