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

AttributeRelation: void-attributes deletable

parent d7caa3eb
No related branches found
No related tags found
No related merge requests found
......@@ -6,4 +6,6 @@ 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
result.string("0");
else if (!contentType)
result.string("");
\ No newline at end of file
......@@ -4,7 +4,7 @@ import("Sql_lib");
import("system.db");
var rowData = vars.get("$local.rowdata");
if (rowData["AB_ATTRIBUTE_ID.value"] && rowData["VALUE.value"])
if (rowData["AB_ATTRIBUTE_ID.value"])
{
db.deleteData("AB_ATTRIBUTERELATION", SqlCondition.equals("AB_ATTRIBUTERELATION.AB_ATTRIBUTERELATIONID", vars.get("$local.uid"), "1=2"));
}
\ No newline at end of file
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