Return early for attributes that begin with two underscores (typically '__conform__').

This commit is contained in:
Malthe Borch 2012-11-21 14:43:37 +01:00
parent 2233d0b535
commit e2fca426d9
1 changed files with 4 additions and 2 deletions

View File

@ -177,10 +177,12 @@ class DexterityContent(DAVResourceMixin, PortalContent, DefaultDublinCoreImpl, C
description = u''
def __getattr__(self, name):
# attribute was not found; try to look it up in the schema and return
# a default
if not name.startswith('__'):
raise AttributeError(name)
schema = SCHEMA_CACHE.get(self.portal_type)
if schema is not None:
field = schema.get(name, None)