File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
src/main/java/com/commercetools/sync/commons/utils Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -217,7 +217,10 @@ public static ProductDraft replaceProductDraftCategoryReferenceIdsWithKeys(@Nonn
217217 if (categoryOrderHintValue == null ) {
218218 // to handle case of getting category order hints from another CTP
219219 // TODO NEEDS TO BE REFACTORED INTO OWN METHOD.
220- categoryOrderHintsMapWithKeys .put (categoryKey , categoryOrderHints .get (categoryId ));
220+ final String categoryOrderHintValueById = categoryOrderHints .get (categoryId );
221+ if (categoryOrderHintValueById != null ) {
222+ categoryOrderHintsMapWithKeys .put (categoryKey , categoryOrderHintValueById );
223+ }
221224 } else {
222225 categoryOrderHintsMapWithKeys .put (categoryKey , categoryOrderHintValue );
223226 }
You can’t perform that action at this time.
0 commit comments