Don't yield null values in CatalogResultSet class
authorThierry Florac <thierry.florac@onf.fr>
Wed, 01 Jul 2015 10:12:56 +0200
changeset 10 a54dbd49da21
parent 9 ed18742b7d88
child 11 09490b1b9bab
Don't yield null values in CatalogResultSet class
src/pyams_catalog/query.py
--- a/src/pyams_catalog/query.py	Wed Jun 17 09:55:51 2015 +0200
+++ b/src/pyams_catalog/query.py	Wed Jul 01 10:12:56 2015 +0200
@@ -38,7 +38,9 @@
         if isinstance(query, tuple):
             query = query[1]
         for oid in query:
-            yield intids.queryObject(oid)
+            target = intids.queryObject(oid)
+            if target is not None:
+                yield target
 
 
 def or_(source, added):