Commit 5775679c authored by Sylvain Thénault's avatar Sylvain Thénault
Browse files

Avoid caching issue during the container setup operation

That may occurs if it's run several time in the same transaction (e.g. when
EnsureArchiveUnitHasAContentOp is run after it has been called).
parent 9431297621ef
......@@ -47,6 +47,9 @@ class SetContainerOp(hook.DataOperationMixIn, hook.Operation):
while peid in data:
peid = data[peid]
entity = cnx.entity_from_eid(peid)
# we may run into caching issue if this operation is triggered several times in a
# transaction
entity.cw_clear_all_caches()
adapter = entity.cw_adapt_to('IContained')
if adapter is None: # we reached the container
containers[eid] = peid
......
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