Commit 5a982747 authored by Romain Courteaud's avatar Romain Courteaud

slapos_pdm: support document without categories property

parent dd3cbd63
...@@ -66,7 +66,13 @@ class SoftwareProduct(ERP5SoftwareProduct): ...@@ -66,7 +66,13 @@ class SoftwareProduct(ERP5SoftwareProduct):
) )
def __getattribute__(self, name): def __getattribute__(self, name):
try:
result = super(SoftwareProduct, self).__getattribute__(name) result = super(SoftwareProduct, self).__getattribute__(name)
except AttributeError:
if name == 'categories':
result = []
else:
raise
if name == 'categories': if name == 'categories':
# Force getting default_category_list # Force getting default_category_list
......
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