View difference between Paste ID: TyUiGvjr and Kq4CJABm
SHOW: | | - or go back to the newest paste.
1
    private static void createOrUpdateAttributeValues(List<ProductAttributeValue> attributeValues,
2
                                                      Product feature,
3
                                                      String attributeId,
4
                                                      String value,
5
                                                      Language language = null,
6
                                                      Boolean isUpdate) {
7
        if (canAttributeValueBeUpdated(isUpdate, attributeId)) {
8
            ProductAttributeValue productAttributeValue = constructAttributeValue(feature, attributeId, value, language)
9
10
            if (productAttributeValue) {
11
                attributeValues << productAttributeValue
12
            }
13
        } else {
14
            log.debug("Skipping updating value of attribute ${attributeId}. Feature id: ${feature.productId}")
15
        }
16-
    }
16+
    }
17
18
    private static final List<String> ATTRIBUTE_IDS_TO_BE_SKIPPED_DURING_UPDATE = [
19
            IDS_DESCRIPTION.name,
20
            COMMERCIAL_SHORT_DESCRIPTION.name,
21
            IS_BPM_APPLICABLE.name,
22
            FEATURE_GROUP.name
23
    ]