Commit eac7573d authored by Jérome Perrin's avatar Jérome Perrin

Make it sure to prevent a builder from creating a new delivery when it is not allowed.

reapply commit 1761194e that got lost in the
renaming
parent a677cd04
......@@ -429,6 +429,10 @@ class BuilderMixin(XMLObject, Amount, Predicate):
delivery = delivery_to_update_list[0]
if delivery is None:
if not self.isDeliveryCreatable():
raise SelectMethodError('No updatable delivery found with %s' \
% (self.getPath(),))
delivery = self._createDelivery(delivery_module,
movement_group_node.getMovementList(),
activate_kw)
......
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