Commit e2bcd8c7 authored by Romain Courteaud's avatar Romain Courteaud

slapos_pdm: workaround to prevent breaking the instance when classes are live reloaded

parent 262d2732
......@@ -66,6 +66,10 @@ class SoftwareProduct(ERP5SoftwareProduct):
)
def __getattribute__(self, name):
if SoftwareProduct is None:
# XXX check lazy_class to understand why the class is None sometimes...
# raising this error prevents breaking the instance in such case
raise AttributeError('SoftwareProduct class is None.')
try:
result = super(SoftwareProduct, self).__getattribute__(name)
except AttributeError:
......
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