web/views/owl.py
changeset 509 1d65eb1a5834
parent 508 fab4e2cfe053
child 512 cfb8d087cba3
--- 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))