Browse Source

fix(admin-ui): Fix creating customer on draft order

Michael Bromley 1 year ago
parent
commit
64b9c60516

+ 2 - 1
packages/admin-ui/src/lib/order/src/components/draft-order-detail/draft-order-detail.component.ts

@@ -110,7 +110,8 @@ export class DraftOrderDetailComponent
                     .setCustomerForDraftOrder(this.id, { customerId: result.id })
                     .subscribe();
             } else if (result) {
-                this.dataService.order.setCustomerForDraftOrder(this.id, { input: result }).subscribe();
+                const { note, ...input } = result;
+                this.dataService.order.setCustomerForDraftOrder(this.id, { input }).subscribe();
             }
         });
     }