Skip to content

Commit 2917af4

Browse files
committed
model method for change batch qty now raise commands hmmm
1 parent 1e27052 commit 2917af4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/allocation/model.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
from dataclasses import dataclass
33
from datetime import date
44
from typing import Optional, List, Set
5-
from allocation import events
5+
from allocation import commands, events
66

77

88
class Product:
@@ -31,7 +31,7 @@ def change_batch_quantity(self, ref: str, qty: int):
3131
while batch.available_quantity < 0:
3232
line = batch.deallocate_one()
3333
self.events.append(
34-
events.AllocationRequired(line.orderid, line.sku, line.qty)
34+
commands.Allocate(line.orderid, line.sku, line.qty)
3535
)
3636

3737
@dataclass(unsafe_hash=True)

0 commit comments

Comments
 (0)