Commit ee095144 authored by Jean-Paul Smets's avatar Jean-Paul Smets

Fixed boolean accessor generation (use of klass, not BaseClass)


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@795 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent eecaad1b
......@@ -1382,13 +1382,13 @@ def createDefaultAccessors(klass, id, prop = None):
tester_name = 'is' + UpperCase(id)
tester = Base.Getter(tester_name, id, prop['type'],
storage_id = prop.get('storage_id'))
if not hasattr(BaseClass, tester_name):
if not hasattr(klass, tester_name):
setattr(klass, tester_name, tester)
klass.security.declareProtected(Permissions.AccessContentsInformation, tester_name)
tester_name = '_baseIs' + UpperCase(id)
tester = Base.Getter(tester_name, id, prop['type'],
storage_id = prop.get('storage_id'))
if not hasattr(BaseClass, tester_name):
if not hasattr(klass, tester_name):
setattr(klass, tester_name, tester)
from Accessor import Category
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment