fix: Disallow creating duplicate prices (#7866)

* fix: Disallow creating duplicate prices

* fix: Don't pass id to manager create in upsertWithReplace
This commit is contained in:
Stevche Radevski
2024-07-02 17:06:58 +02:00
committed by GitHub
parent 87375db9ef
commit b4aa7fb9a7
12 changed files with 560 additions and 350 deletions

View File

@@ -42,4 +42,28 @@ export const eventBuilders = {
object: "price_list_rule",
eventsEnum: PricingEvents,
}),
updatedPrice: eventBuilderFactory({
source: Modules.PRICING,
action: CommonEvents.UPDATED,
object: "price",
eventsEnum: PricingEvents,
}),
updatedPriceRule: eventBuilderFactory({
source: Modules.PRICING,
action: CommonEvents.UPDATED,
object: "price_rule",
eventsEnum: PricingEvents,
}),
deletedPrice: eventBuilderFactory({
source: Modules.PRICING,
action: CommonEvents.DELETED,
object: "price",
eventsEnum: PricingEvents,
}),
deletedPriceRule: eventBuilderFactory({
source: Modules.PRICING,
action: CommonEvents.DELETED,
object: "price_rule",
eventsEnum: PricingEvents,
}),
}