November Happy Hour will be moved to Thursday December 5th.

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.