[xcede] Fix xcede for heterogenous measures
authorVincent Michel <vincent.michel@logilab.fr>
Tue, 16 Jul 2013 14:01:40 +0200
changeset 290 177b5a9ca313
parent 289 41b25c4f7519
child 291 dce1255ccd02
[xcede] Fix xcede for heterogenous measures
views/xcede.py
--- a/views/xcede.py	Tue Jul 16 13:28:32 2013 +0200
+++ b/views/xcede.py	Tue Jul 16 14:01:40 2013 +0200
@@ -64,10 +64,11 @@
         # Scans, Questionnaires
         # XXX Only use it for now if we have less than 10 subjects - time consuming
         if len(self.cw_rset) < 10:
-            rset = self._cw.execute('Any M WHERE M concerns S, S eid %(e)s, '
-                                    'M is IN (Scan, QuestionnaireRun, GenomicMeasure)', {'e': entity.eid})
-            if rset:
-                self.wview('xcede-item', rset)
+            for etype in ('Scan', 'QuestionnaireRun', 'GenomicMeasure'):
+                rset = self._cw.execute('Any M WHERE M concerns S, S eid %%(e)s, '
+                                        'M is %s' % etype, {'e': entity.eid})
+                if rset:
+                    self.wview('xcede-item', rset)
 
 
 # XXX AbstractMeasureXcedeItemView ?