Commit c12779c0 authored by Sebastien Robin's avatar Sebastien Robin

try to reindex the object before updating relation


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@1294 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 58b0bcb1
##parameters=form_id, selection_index, selection_name, object_uid ##parameters=form_id, selection_index, selection_name, object_uid, object_path
# Updates attributes of an Zope document # Updates attributes of an Zope document
# which is in a class inheriting from ERP5 Base # which is in a class inheriting from ERP5 Base
...@@ -19,6 +19,11 @@ o = context.portal_catalog.getObject(object_uid) ...@@ -19,6 +19,11 @@ o = context.portal_catalog.getObject(object_uid)
redirect_url = None redirect_url = None
if o is None: if o is None:
# we first try to reindex the object, thanks to the object_path
o = context.restrictedTraverse(object_path)
if o is not None:
o.immediateReindexObject()
else:
return "Sorrry, Error, the calling object was not catalogued. Do not know how to do ?" return "Sorrry, Error, the calling object was not catalogued. Do not know how to do ?"
def checkSameKeys(a , b): def checkSameKeys(a , b):
......
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