Commit e3c10954 authored by Kevin Deldycke's avatar Kevin Deldycke

Verify that getDataModel is callable


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@503 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 03008bae
......@@ -45,6 +45,7 @@ class PatchedCPSDocument(CPSDocument):
type_info = self.getTypeInfo()
field_list = []
if type_info is not None:
if hasattr(type_info,'getDataModel'):
data_model = type_info.getDataModel(self)
if data_model is not None:
field_list = data_model._fields.items()
......
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