Don't miss out Virtual Happy Hour this Friday (April 26).

Try our conversational search powered by Generative AI!

The API should not allow for adding duplicate assets to products

Fixed in

EPiServer.Commerce 13.29.0

(Or a related package)

Created

Sep 30, 2020

Updated

Feb 04, 2021

State

Closed, Fixed and tested


Description

This is a fix for an issue where the API allows for addition of duplicate assets to products.

Scenario: When adding multiple media items with the same key/ID to a product, it causes an exception (duplicate key) when saving the next time.

Cause: 

AssetServiceDatabase.CommitAssets does not check duplication for the updatingRows list.

In this case, an exception should be thrown.