From 55ed5b433da454a4ebafb9801c17f06147799c56 Mon Sep 17 00:00:00 2001 From: helmutm Date: Wed, 3 Oct 2007 12:44:44 +0000 Subject: [PATCH] bugfix on FileSchemaFactory git-svn-id: svn://svn.cy55.de/Zope3/src/loops/trunk@2086 fd906abe-77d9-0310-91a1-e0d9ade77398 --- schema.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/schema.py b/schema.py index 1325f25..a30b9d3 100644 --- a/schema.py +++ b/schema.py @@ -44,7 +44,8 @@ class FileSchemaFactory(SchemaFactory): def __call__(self, interface, **kw): schema = super(FileSchemaFactory, self).__call__(interface, **kw) - if 'request' in kw and kw['request'].principal.id != 'rootadmin': + if ('request' in kw and kw['request'].principal.id != 'rootadmin' + and 'contentType' in schema.fields.keys()): del schema.fields['contentType'] return schema