We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4aa165e commit 60ed42aCopy full SHA for 60ed42a
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):
@@ -24,6 +25,7 @@ def allocate(self, line: OrderLine) -> str:
24
25
self.version_number += 1
26
return batch.reference
27
except StopIteration:
28
+ email.send_mail('stock@made.com', f'Out of stock for {line.sku}')
29
raise OutOfStock(f'Out of stock for sku {line.sku}')
30
31
0 commit comments