lazy_class: remove Broken from the base classes of ERP5BaseBroken.
otherwise we will have an Exception in Python 3 while importing a Business Template,
if a new portal type and its documents exist in the same Business Template.
while importing a content file, like *.js...
(BusinessTemplate.py)
try:
setattr(obj, property_name, data)
except BrokenModified:
obj.__Broken_state__[property_name] = data # <-- !!!
obj._p_changed = 1
obj.__Broken_state__ access here also raises BrokenModified.
while importing an XML file...
(ZODB/broken.py)
def __new__(class_, *args):
result = object.__new__(class_) # <-- !!!
result.__dict__['__Broken_newargs__'] = args
return result
we get an exception 'TypeError: object.__new__(Portal Type) is not safe, use Base.__new__()'
Co-authored-by: Kazuhiko SHIOZAKI <kazuhiko@nexedi.com>
Showing
Please register or sign in to comment