bugfix on FileSchemaFactory

git-svn-id: svn://svn.cy55.de/Zope3/src/loops/trunk@2086 fd906abe-77d9-0310-91a1-e0d9ade77398
This commit is contained in:
helmutm 2007-10-03 12:44:44 +00:00
parent 4f7aea9b56
commit 55ed5b433d

View file

@ -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