Skip to content
Snippets Groups Projects
Commit bcf902d4 authored by Sebastian Listl's avatar Sebastian Listl :speech_balloon:
Browse files

Attribute_lib update usages fix

parent 39c162bf
No related branches found
No related tags found
No related merge requests found
......@@ -1079,7 +1079,7 @@ AttributeUsageUtil.insertChildrenUsages = function (pAttributeId, pObjectType)
*/
AttributeUsageUtil.updateChildrenUsages = function (pAttributeId, pOldObjectType, pNewObjectType)
{
if (!pNewObjectType || !pAttributeId)
if (!pNewObjectType || !pAttributeId || !pOldObjectType)
return;
var table = "AB_ATTRIBUTEUSAGE";
......@@ -1114,7 +1114,7 @@ AttributeUsageUtil.updateChildrenUsages = function (pAttributeId, pOldObjectType
var condition = SqlCondition.begin()
.andPrepare("AB_ATTRIBUTE.ATTRIBUTE_TYPE", $AttributeTypes.COMBOVALUE, "# != ?")
.andPrepare("AB_ATTRIBUTE.ATTRIBUTE_PARENT_ID", pAttributeId);
var query = sqlSelect.where(condition);
var query = sqlSelect.clearWhere().where(condition);
var attributes = db.table(query.build());
attributes.forEach(function (row)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment