OWLABOXView correction
authorLaure Bourgois <Laure.Bourgois@logilab.fr>
Wed, 28 Jan 2009 17:30:04 +0100
changeset 509 1d65eb1a5834
parent 508 fab4e2cfe053
child 511 5df6588d7374
OWLABOXView correction
web/views/owl.py
--- a/web/views/owl.py	Wed Jan 28 17:28:08 2009 +0100
+++ b/web/views/owl.py	Wed Jan 28 17:30:04 2009 +0100
@@ -242,7 +242,7 @@
             else:
                 rel = getattr(entity, rschema.type)
                 reverse = '%s' % rschema.type        
-            if len(rel):
+            if rel:
                 for x in rel:
                     if hasattr(x, 'name'):
                         self.w(u'''<%s>%s %s %s</%s> ''' % (reverse, targetschemas[0], html_escape(unicode(x.name)), html_escape(unicode(x.eid)), reverse))