[issue41484] Overriding dictionary value under wrong key.

2020-08-05 Thread Ronald Oussoren
Ronald Oussoren added the comment: This is expected behaviour. the assessment to retProduct[productKey] is not a copy. If those variants have the same parent and a different color you'll end up with a baseProduct where 'variants' refers to the same variant dict (and the second color seen wil

[issue41484] Overriding dictionary value under wrong key.

2020-08-05 Thread Admir Ljubijankić
New submission from Admir Ljubijankić : I'm writing a function that combines two dictionaries called "baseProducts" and "variantProducts". The logic behind is simple, I loop trough variantProducts, create a string that will be used as a key for that combined product. Add all values of baseProdu