chore: prevent workflow steps to call modules when not necessary (#11632)
**What** Some steps were calling the modules even when nothing was needed which for some operations would create transaction for nothing leading to extra execution time that add up very quickly on cloud network Co-authored-by: Carlos R. L. Rodrigues <37986729+carlos-r-l-rodrigues@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
54a6ef91ac
commit
caf83cf78c
@@ -1083,10 +1083,9 @@ export default class CartModuleService
|
||||
)
|
||||
}
|
||||
|
||||
const result = await this.lineItemTaxLineService_.upsert(
|
||||
taxLines,
|
||||
sharedContext
|
||||
)
|
||||
const result = taxLines.length
|
||||
? await this.lineItemTaxLineService_.upsert(taxLines, sharedContext)
|
||||
: []
|
||||
|
||||
return await this.baseRepository_.serialize<CartTypes.LineItemTaxLineDTO[]>(
|
||||
result,
|
||||
@@ -1201,10 +1200,12 @@ export default class CartModuleService
|
||||
)
|
||||
}
|
||||
|
||||
const result = await this.shippingMethodTaxLineService_.upsert(
|
||||
taxLines as UpdateShippingMethodTaxLineDTO[],
|
||||
sharedContext
|
||||
)
|
||||
const result = taxLines.length
|
||||
? await this.shippingMethodTaxLineService_.upsert(
|
||||
taxLines as UpdateShippingMethodTaxLineDTO[],
|
||||
sharedContext
|
||||
)
|
||||
: []
|
||||
|
||||
return await this.baseRepository_.serialize<
|
||||
CartTypes.ShippingMethodTaxLineDTO[]
|
||||
|
||||
Reference in New Issue
Block a user