Skip to content

Commit 623c9d0

Browse files
committed
little refactor
1 parent 1223c18 commit 623c9d0

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

domain_model.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -95,11 +95,10 @@ def for_(order: Order, source: Stock):
9595
order=order
9696
)
9797

98-
def supplement_with(self, allocation):
99-
for line in allocation.lines:
100-
if line.sku in self.skus:
101-
continue
102-
self.lines.append(line)
98+
def supplement_with(self, other_allocation):
99+
self.lines.extend(
100+
l for l in other_allocation.lines if l.sku not in self.skus
101+
)
103102

104103
@property
105104
def is_complete(self):

0 commit comments

Comments
 (0)