diff --git a/packages/medusa/src/api/routes/admin/orders/request-return.js b/packages/medusa/src/api/routes/admin/orders/request-return.js index b1c406881a..1d3e0c0da0 100644 --- a/packages/medusa/src/api/routes/admin/orders/request-return.js +++ b/packages/medusa/src/api/routes/admin/orders/request-return.js @@ -149,11 +149,7 @@ export default async (req, res) => { .withTransaction(manager) .retrieve(id) -<<<<<<< HEAD - const evaluatedNoNotification = value.no_notification !== undefined && value.no_notification !== null ? value.no_notification : order.no_notification -======= const evaluatedNoNotification = value.no_notification !== undefined ? value.no_notification : order.no_notification ->>>>>>> 04fe5292f7e9dcd14cb1a4ea17db8978f9b52c03 returnObj.no_notification = evaluatedNoNotification const createdReturn = await returnService diff --git a/packages/medusa/src/migrations/1623231564533-no_notification.ts b/packages/medusa/src/migrations/1623231564533-no_notification.ts index 8720f89bfc..20e3f9a9a2 100644 --- a/packages/medusa/src/migrations/1623231564533-no_notification.ts +++ b/packages/medusa/src/migrations/1623231564533-no_notification.ts @@ -8,25 +8,16 @@ export class noNotification1623231564533 implements MigrationInterface { await queryRunner.query(`ALTER TABLE "claim_order" ADD "no_notification" boolean`); await queryRunner.query(`ALTER TABLE "swap" ADD "no_notification" boolean`); await queryRunner.query(`ALTER TABLE "order" ADD "no_notification" boolean`); -<<<<<<< HEAD await queryRunner.query(`ALTER TABLE "draft_order" ADD "no_notification_order" boolean`); } public async down(queryRunner: QueryRunner): Promise { await queryRunner.query(`ALTER TABLE "draft_order" DROP COLUMN "no_notification_order"`); -======= - } - - public async down(queryRunner: QueryRunner): Promise { ->>>>>>> 04fe5292f7e9dcd14cb1a4ea17db8978f9b52c03 await queryRunner.query(`ALTER TABLE "order" DROP COLUMN "no_notification"`); await queryRunner.query(`ALTER TABLE "swap" DROP COLUMN "no_notification"`); await queryRunner.query(`ALTER TABLE "claim_order" DROP COLUMN "no_notification"`); await queryRunner.query(`ALTER TABLE "return" DROP COLUMN "no_notification"`); -<<<<<<< HEAD -======= ->>>>>>> 04fe5292f7e9dcd14cb1a4ea17db8978f9b52c03 } } diff --git a/packages/medusa/src/services/__tests__/claim.js b/packages/medusa/src/services/__tests__/claim.js index 63c742540b..00cc35fe7e 100644 --- a/packages/medusa/src/services/__tests__/claim.js +++ b/packages/medusa/src/services/__tests__/claim.js @@ -215,16 +215,9 @@ describe("ClaimService", () => { it.each( [ [false, false], -<<<<<<< HEAD - [undefined, true], - [null, true], - ]) - ("passes correct no_notification status to event bus, with '%s'", async (input, expected) => { -======= [undefined, true] ], "passes correct no_notification status to event bus", async (input, expected) => { ->>>>>>> 04fe5292f7e9dcd14cb1a4ea17db8978f9b52c03 await claimService.create({ ...testClaim, no_notification: input, @@ -234,10 +227,6 @@ describe("ClaimService", () => { id: expect.any(String), no_notification: expected }) -<<<<<<< HEAD -======= - ->>>>>>> 04fe5292f7e9dcd14cb1a4ea17db8978f9b52c03 }) }) diff --git a/packages/medusa/src/services/__tests__/order.js b/packages/medusa/src/services/__tests__/order.js index 33f41d94b4..a64b18a688 100644 --- a/packages/medusa/src/services/__tests__/order.js +++ b/packages/medusa/src/services/__tests__/order.js @@ -1134,12 +1134,7 @@ describe("OrderService", () => { it.each([ [false, false], [undefined, true], -<<<<<<< HEAD - [null, true], ])("emits correct no_notification option with '%s'", async (input, expected) => { -======= - ],"emits correct no_notification option", async (input, expected) => { ->>>>>>> 04fe5292f7e9dcd14cb1a4ea17db8978f9b52c03 await orderService.createRefund( IdMap.getId("order_123"), 100, diff --git a/packages/medusa/src/services/__tests__/swap.js b/packages/medusa/src/services/__tests__/swap.js index 3e6c6264b0..4adb462748 100644 --- a/packages/medusa/src/services/__tests__/swap.js +++ b/packages/medusa/src/services/__tests__/swap.js @@ -345,12 +345,7 @@ describe("SwapService", () => { [true, true], [false, false], [undefined, true], -<<<<<<< HEAD - [null, true], - ])( "passes correct no_notification to eventBus with '%s'", async (input, expected) => { -======= ])( "passes correct no_notification to eventBus with %s", async (input, expected) => { ->>>>>>> 04fe5292f7e9dcd14cb1a4ea17db8978f9b52c03 await swapService.create( testOrder, diff --git a/packages/medusa/src/services/claim.js b/packages/medusa/src/services/claim.js index 7387136ef1..469ef9543c 100644 --- a/packages/medusa/src/services/claim.js +++ b/packages/medusa/src/services/claim.js @@ -241,11 +241,7 @@ class ClaimService extends BaseService { ) ) -<<<<<<< HEAD - const evaluatedNoNotification = no_notification !== undefined && no_notification !== null ? no_notification : order.no_notification -======= const evaluatedNoNotification = no_notification !== undefined ? no_notification : order.no_notification ->>>>>>> 04fe5292f7e9dcd14cb1a4ea17db8978f9b52c03 const created = claimRepo.create({ shipping_address_id: addressId, diff --git a/packages/medusa/src/services/swap.js b/packages/medusa/src/services/swap.js index 47ee78822c..3d213d4299 100644 --- a/packages/medusa/src/services/swap.js +++ b/packages/medusa/src/services/swap.js @@ -238,11 +238,7 @@ class SwapService extends BaseService { }) ) -<<<<<<< HEAD - const evaluatedNoNotification = noNotification !== undefined && noNotification !== null ? noNotification : order.no_notification -======= const evaluatedNoNotification = noNotification !== undefined ? noNotification : order.no_notification ->>>>>>> 04fe5292f7e9dcd14cb1a4ea17db8978f9b52c03 const swapRepo = manager.getCustomRepository(this.swapRepository_) const created = swapRepo.create({