Procházet zdrojové kódy

fix(core): Fix delete order method when called with id (#1751)

Gustavo Alves před 3 roky
rodič
revize
fc57b0d861

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

@@ -1558,7 +1558,7 @@ export class OrderService {
                 ? orderOrId
                 ? orderOrId
                 : await this.connection
                 : await this.connection
                       .getRepository(ctx, Order)
                       .getRepository(ctx, Order)
-                      .findOneOrFail(orderOrId, { relations: ['lines'] });
+                      .findOneOrFail(orderOrId, { relations: ['lines', 'shippingLines'] });
         // If there is a Session referencing the Order to be deleted, we must first remove that
         // If there is a Session referencing the Order to be deleted, we must first remove that
         // reference in order to avoid a foreign key error. See https://github.com/vendure-ecommerce/vendure/issues/1454
         // reference in order to avoid a foreign key error. See https://github.com/vendure-ecommerce/vendure/issues/1454
         const sessions = await this.connection
         const sessions = await this.connection