Skip to content

Commit

Permalink
fix(core): Fix missing shipping lines in partial order (#2766)
Browse files Browse the repository at this point in the history
  • Loading branch information
Swampy469 authored Apr 5, 2024
1 parent 7bae5d7 commit d4ec842
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,13 @@ export class OrderSplitter {
}
const shippingLines: ShippingLine[] = [];
for (const shippingLine of partialOrder.shippingLines) {
shippingLines.push(await this.duplicateShippingLine(ctx, shippingLine));
const newShippingLine = await this.duplicateShippingLine(ctx, shippingLine);
lines.map((line) => {
if(shippingLine.id === line.shippingLineId) {
line.shippingLineId = newShippingLine.id;
}
})
shippingLines.push(newShippingLine);
}
const sellerOrder = await this.connection.getRepository(ctx, Order).save(
new Order({
Expand Down

0 comments on commit d4ec842

Please sign in to comment.