Explorar o código

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

Gustavo Alves %!s(int64=3) %!d(string=hai) anos
pai
achega
fc57b0d861
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      packages/core/src/service/services/order.service.ts

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

@@ -1558,7 +1558,7 @@ export class OrderService {
                 ? orderOrId
                 : await this.connection
                       .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
         // reference in order to avoid a foreign key error. See https://github.com/vendure-ecommerce/vendure/issues/1454
         const sessions = await this.connection