Skip to content
Snippets Groups Projects
Commit b44a43c2 authored by S.Listl's avatar S.Listl
Browse files

AttributeRelation SqlBuilder fix

parent 83078768
No related branches found
No related tags found
No related merge requests found
......@@ -2,8 +2,7 @@ import("Attribute_lib");
import("system.vars");
import("system.result");
var attributeType = vars.get("$field.ATTRIBUTE_TYPE");
var contentType = AttributeTypeUtil.getContentType(attributeType);
if (!vars.get("$this.value") && contentType == "BOOLEAN")
result.string("0");
\ No newline at end of file
if (vars.get("$this.value") == null && contentType == "BOOLEAN")
result.string("0");
......@@ -123,7 +123,7 @@ if (getTree)
let minUsages = newSelect("AB_ATTRIBUTE_ID, MIN_COUNT")
.from("AB_ATTRIBUTEUSAGE")
.whereIfSet("AB_ATTRIBUTEUSAGE.AB_ATTRIBUTE_ID", possibleAttributes)
.whereIfSet("AB_ATTRIBUTEUSAGE.AB_ATTRIBUTE_ID", possibleAttributes, SqlBuilder.IN())
.and("AB_ATTRIBUTEUSAGE.OBJECT_TYPE", objectType)
.table(true);
......
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