Add 'set' to list of supported states types when looking for reference
authorThierry Florac <thierry.florac@onf.fr>
Fri, 10 Nov 2017 13:31:56 +0100
changeset 22 fe6d6f66a0d2
parent 21 ba2a2e44885b
child 23 73120848db81
Add 'set' to list of supported states types when looking for reference
src/pyams_sequence/utility.py
--- a/src/pyams_sequence/utility.py	Fri Oct 13 10:02:09 2017 +0200
+++ b/src/pyams_sequence/utility.py	Fri Nov 10 13:31:56 2017 +0100
@@ -90,7 +90,7 @@
     params = Eq(catalog['oid'], reference)
     if handle_workflow:
         if state:
-            if not isinstance(state, (list, tuple)):
+            if not isinstance(state, (list, tuple, set)):
                 state = (state,)
             params &= Any(catalog['workflow_state'], state)
             results = list(CatalogResultSet(CatalogQuery(catalog).query(params)))