removed wrong select

This commit is contained in:
--list
2021-06-17 10:11:32 +02:00
parent 7ce8001906
commit 0223b89a73
2 changed files with 17 additions and 17 deletions

View File

@@ -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
})
}
}

View File

@@ -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",