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