removed wrong select
This commit is contained in:
@@ -345,26 +345,26 @@ class DraftOrderService extends BaseService {
|
||||
*/
|
||||
async update(doId, data){
|
||||
return this.atomicPhase_(async manager => {
|
||||
const doRepo = manager.getCustomRepository(this.draftOrderRepository_)
|
||||
const draftOrder = await this.retrieve(doId)
|
||||
let touched = false
|
||||
// const doRepo = manager.getCustomRepository(this.draftOrderRepository_)
|
||||
// const draftOrder = await this.retrieve(doId)
|
||||
// let touched = false
|
||||
|
||||
if(data.no_notification_order !== undefined){
|
||||
touched = true
|
||||
draftOrder.no_notification_order = data.no_notification_order
|
||||
}
|
||||
// if(data.no_notification_order !== undefined){
|
||||
// touched = true
|
||||
// draftOrder.no_notification_order = data.no_notification_order
|
||||
// }
|
||||
|
||||
if(touched){
|
||||
doRepo.save(draftOrder)
|
||||
// if(touched){
|
||||
// doRepo.save(draftOrder)
|
||||
|
||||
await this.eventBus_
|
||||
.withTransaction(manager)
|
||||
.emit(DraftOrderService.Events.UPDATED, {
|
||||
id: draftOrder.id
|
||||
})
|
||||
}
|
||||
// await this.eventBus_
|
||||
// .withTransaction(manager)
|
||||
// .emit(DraftOrderService.Events.UPDATED, {
|
||||
// id: draftOrder.id
|
||||
// })
|
||||
// }
|
||||
|
||||
return draftOrder
|
||||
// return draftOrder
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
@@ -508,6 +508,7 @@ class OrderService extends BaseService {
|
||||
|
||||
toCreate.draft_order_id = draft.id
|
||||
toCreate.no_notification = draft.no_notification_order
|
||||
|
||||
}
|
||||
|
||||
const o = await orderRepo.create(toCreate)
|
||||
@@ -991,7 +992,6 @@ class OrderService extends BaseService {
|
||||
"tax_total",
|
||||
"gift_card_total",
|
||||
"total",
|
||||
"no_notification"
|
||||
],
|
||||
relations: [
|
||||
"discounts",
|
||||
|
||||
Reference in New Issue
Block a user