Commit 28b0e3b9 authored by Alain Takoudjou's avatar Alain Takoudjou

slapos_accounting: fix tests on Delivery_manageBuildingCalculatingDelivery

tests on this method clouldn't reach updateCausalityState and updateSimulation with the condition portal_activities.countMessage(...) == 1
parent 37f3b080
from zExceptions import Unauthorized
if REQUEST is not None:
raise Unauthorized
......@@ -8,7 +10,7 @@ path = delivery.getPath()
portal_activities = context.getPortalObject().portal_activities
if portal_activities.countMessage(method_id='Delivery_manageBuildingCalculatingDelivery', path=path) == 1 \
if portal_activities.countMessage(method_id='Delivery_manageBuildingCalculatingDelivery', path=path) <= 1 \
and portal_activities.countMessageWithTag('%s_solve' % path) == 0:
delivery.serialize()
delivery.updateCausalityState(solve_automatically=True)
......
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