Skip to content

Commit

Permalink
fix(core): Fix regression in updating of Order custom fields
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelbromley committed Jun 3, 2024
1 parent 1e0c96f commit 2744068
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/core/src/service/services/order.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -472,8 +472,8 @@ export class OrderService {
async updateCustomFields(ctx: RequestContext, orderId: ID, customFields: any) {
let order = await this.getOrderOrThrow(ctx, orderId);
order = patchEntity(order, { customFields });
await this.customFieldRelationService.updateRelations(ctx, Order, { customFields }, order);
const updatedOrder = await this.connection.getRepository(ctx, Order).save(order);
await this.customFieldRelationService.updateRelations(ctx, Order, { customFields }, updatedOrder);
await this.eventBus.publish(new OrderEvent(ctx, updatedOrder, 'updated'));
return updatedOrder;
}
Expand Down

0 comments on commit 2744068

Please sign in to comment.