We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent cb64973 commit 3be2bbcCopy full SHA for 3be2bbc
src/allocation/domain/model.py
@@ -2,6 +2,7 @@
2
from dataclasses import dataclass
3
from datetime import date
4
from typing import Optional, List, Set
5
+from allocation.adapters import email
6
7
8
class OutOfStock(Exception):
@@ -21,6 +22,7 @@ def allocate(self, line: OrderLine) -> str:
21
22
self.version_number += 1
23
return batch.reference
24
except StopIteration:
25
+ email.send_mail("stock@made.com", f"Out of stock for {line.sku}")
26
raise OutOfStock(f"Out of stock for sku {line.sku}")
27
28
0 commit comments