소스 검색

fix(core): Correctly save OrderLine shippingLineId

Michael Bromley 2 년 전
부모
커밋
f703e063bc
1개의 변경된 파일4개의 추가작업 그리고 1개의 파일을 삭제
  1. 4 1
      packages/core/src/service/services/order.service.ts

+ 4 - 1
packages/core/src/service/services/order.service.ts

@@ -919,9 +919,12 @@ export class OrderService {
                 .update({ shippingLineId: shippingLine.id })
                 .whereInIds(orderLinesForShippingLine.map(l => l.id))
                 .execute();
+            orderLinesForShippingLine.forEach(line => {
+                line.shippingLine = shippingLine;
+            });
         }
         const updatedOrder = await this.getOrderOrThrow(ctx, orderId);
-        await this.applyPriceAdjustments(ctx, updatedOrder);
+        await this.applyPriceAdjustments(ctx, order);
         return this.connection.getRepository(ctx, Order).save(order);
     }