Skip to content

Commit 6283d81

Browse files
committed
#555 fix images not synced
1 parent adba259 commit 6283d81

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/main/java/com/commercetools/sync/products/utils/VariantReferenceResolutionUtils.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ private static ProductVariantDraft mapToProductVariantDraft(
5252
.prices(mapToPriceDrafts(productVariant, referenceIdToKeyCache))
5353
.attributes(productVariant.getAttributes())
5454
.assets(mapToAssetDrafts(productVariant.getAssets(), referenceIdToKeyCache))
55+
.images(productVariant.getImages())
5556
.build();
5657
}
5758

src/test/java/com/commercetools/sync/products/utils/VariantReferenceResolutionUtilsTest.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -257,8 +257,8 @@ void mapToVariantDraft_WithAttributesWithNoReferences_ShouldNotChangeAttributes(
257257
final List<ProductVariantDraft> replacedDrafts =
258258
VariantReferenceResolutionUtils.mapToProductVariantDrafts(
259259
singletonList(masterVariant), referenceIdToKeyCache);
260-
replacedDrafts
261-
.get(0)
260+
final ProductVariantDraft variantDraft = replacedDrafts.get(0);
261+
variantDraft
262262
.getAttributes()
263263
.forEach(
264264
attributeDraft -> {
@@ -271,5 +271,6 @@ void mapToVariantDraft_WithAttributesWithNoReferences_ShouldNotChangeAttributes(
271271
assertThat(originalAttribute).isNotNull();
272272
assertThat(originalAttribute.getValue()).isEqualTo(attributeDraft.getValue());
273273
});
274+
assertThat(variantDraft.getImages()).isEqualTo(masterVariant.getImages());
274275
}
275276
}

0 commit comments

Comments
 (0)