check we have a description *yams attribute*
authorSylvain Thenault <sylvain.thenault@logilab.fr>
Mon, 22 Dec 2008 14:31:07 +0100
changeset 253 57e88c0ba286
parent 252 8cd0c2111783
child 254 b1eda3dd844a
child 255 5d2804b9a28c
check we have a description *yams attribute*
entities/__init__.py
--- a/entities/__init__.py	Mon Dec 22 14:30:44 2008 +0100
+++ b/entities/__init__.py	Mon Dec 22 14:31:07 2008 +0100
@@ -131,7 +131,7 @@
     
     def dc_description(self, format='text/plain'):
         """return a suitable description for this entity"""
-        if hasattr(self, 'description'):
+        if self.e_schema.has_subject_relation('description'):
             return self.printable_value('description', format=format)
         return u''