don't fail on unregistered properties tls-sprint
authorsylvain.thenault@logilab.fr
Wed, 08 Apr 2009 20:30:47 +0200
branchtls-sprint
changeset 1302 dd984d682ab0
parent 1301 4596ce9bb4dc
child 1303 62be4ece4552
don't fail on unregistered properties
entities/lib.py
--- a/entities/lib.py	Wed Apr 08 20:30:25 2009 +0200
+++ b/entities/lib.py	Wed Apr 08 20:30:47 2009 +0200
@@ -11,6 +11,7 @@
 
 from logilab.common.decorators import cached
 
+from cubicweb import UnknownProperty
 from cubicweb.entity import _marker
 from cubicweb.entities import AnyEntity, fetch_config
 
@@ -97,7 +98,10 @@
         return self.vreg.typed_value(self.pkey, self.value)
         
     def dc_description(self):
-        return self.req._(self.vreg.property_info(self.pkey)['help'])
+        try:
+            return self.req._(self.vreg.property_info(self.pkey)['help'])
+        except UnknownProperty:
+            return u''
 
     def after_deletion_path(self):
         """return (path, parameters) which should be used as redirect