From e3c10954f2ceff6188f1549dd99848aee2797866 Mon Sep 17 00:00:00 2001 From: Kevin Deldycke <kevin@nexedi.com> Date: Mon, 23 Feb 2004 15:36:30 +0000 Subject: [PATCH] Verify that getDataModel is callable git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@503 20353a03-c40f-0410-a6d1-a30d3c3de9de --- product/ERP5CPS/CPSDocumentPatch.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/product/ERP5CPS/CPSDocumentPatch.py b/product/ERP5CPS/CPSDocumentPatch.py index 87eb1ff4da..ae9049e8d8 100755 --- a/product/ERP5CPS/CPSDocumentPatch.py +++ b/product/ERP5CPS/CPSDocumentPatch.py @@ -45,9 +45,10 @@ class PatchedCPSDocument(CPSDocument): type_info = self.getTypeInfo() field_list = [] if type_info is not None: - data_model = type_info.getDataModel(self) - if data_model is not None: - field_list = data_model._fields.items() + if hasattr(type_info,'getDataModel'): + data_model = type_info.getDataModel(self) + if data_model is not None: + field_list = data_model._fields.items() field_list.sort() for (prop_id,field) in field_list: #for field in schema.objectValues(): -- 2.30.9