Commit 56149d16 authored by Rafael Monnerat's avatar Rafael Monnerat

slapos_erp5: Minor update on log usage

parent 0f9ac845
from erp5.component.module.Log import log
for path, uid in column_list: for path, uid in column_list:
try: try:
ob = context.restrictedTraverse(path) ob = context.restrictedTraverse(path)
except KeyError: except KeyError:
context.log("object not found", path) log("object not found", path)
context.portal_catalog.activate(activity='SQLQueue').uncatalog_object(uid=uid) context.portal_catalog.activate(activity='SQLQueue').uncatalog_object(uid=uid)
else: else:
ob.reindexObject() ob.reindexObject()
from erp5.component.module.Log import log
for path, uid in column_list: for path, uid in column_list:
try: try:
_ = context.restrictedTraverse(path) _ = context.restrictedTraverse(path)
except KeyError: except KeyError:
context.log("object not found", path) log("object not found", path)
context.portal_catalog.activate(activity='SQLQueue').uncatalog_object(uid=uid) context.portal_catalog.activate(activity='SQLQueue').uncatalog_object(uid=uid)
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