Skip to content

Commit cbb1a00

Browse files
committed
Only uppercase if not read only.
1 parent f584ede commit cbb1a00

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

src/Modules/OrchardCore.Commerce/Drivers/ProductPartDisplayDriver.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,13 +56,15 @@ public override async Task<IDisplayResult> UpdateAsync(
5656
return await EditAsync(part, context);
5757
}
5858

59-
part.Sku = part.Sku.ToUpperInvariant();
60-
6159
// If the SKU is read-only then editing should not be possible, but here we undo any POST trickery just in case.
6260
if (IsSkuReadOnly)
6361
{
6462
part.Sku = skuBefore;
6563
}
64+
else
65+
{
66+
part.Sku = part.Sku.ToUpperInvariant();
67+
}
6668

6769
if (part.ContentItem.As<InventoryPart>() is { } inventoryPart)
6870
{

0 commit comments

Comments
 (0)