Commit ac5d2380 authored by Fabien Morin's avatar Fabien Morin

search the form using id instead of searchterm. In this way, we are sure that

all results have the same id.
In case of more than one result, display the list of result. This is helpful to
understand why an update could not be done


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@20480 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent a5b989bf
......@@ -83,7 +83,7 @@ def ERP5Site_updateModuleScribus(self,
temp_portal_type = object_portal_type.replace(' ', '')
search_param = {
'obj_metatypes': 'ERP5 Form',
'obj_searchterm': '%s_view' % temp_portal_type,
'obj_ids': ['%s_view' % temp_portal_type,],
'search_sub': 1
}
result = portal.portal_skins.PrincipiaFind( portal.portal_skins,
......@@ -98,7 +98,7 @@ def ERP5Site_updateModuleScribus(self,
# We should have only one result
if len(good_result) > 1:
raise ValueError, "Error: There is more than one result for the "\
"view '%s_view'" % object_portal_type
"view '%s_view' : %s" % (object_portal_type, good_result)
elif len(good_result) < 1:
raise ValueError, "Error: There is no result for the view "\
"'%s_view'" % object_portal_type
......
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