Skip to content

Commit

Permalink
Revert "Remove enforced unique validation on SKU (#2029)"
Browse files Browse the repository at this point in the history
This reverts commit d2ad394.
  • Loading branch information
alecritson committed Jan 17, 2025
1 parent 2d0ac1c commit e31e7bc
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,12 @@ public function form(Form $form): Form

return $form->schema([
Section::make()->schema([
ProductVariantResource::getSkuFormComponent()->live(),
ProductVariantResource::getSkuFormComponent()
->live()->unique(
table: fn () => $variant->getTable(),
ignorable: $variant,
ignoreRecord: true,
),
ProductVariantResource::getGtinFormComponent(),
ProductVariantResource::getMpnFormComponent(),
ProductVariantResource::getEanFormComponent(),
Expand Down

0 comments on commit e31e7bc

Please sign in to comment.