Skip to content
Snippets Groups Projects
Commit 59d188e4 authored by j.goderbauer's avatar j.goderbauer
Browse files

DSGVO: several bugfixes

parent 56bfe89b
No related branches found
No related tags found
No related merge requests found
......@@ -174,11 +174,14 @@ DataPrivacyType.get = function(pKey)
{
// Todo Format or set content dsgvotype
var persData = _selectPersonal(pContactId, pContactIdSaved, ["DATEOFBIRTH"]);
return [{
value: persData.DATEOFBIRTH,
id: persData.CONTACTID
}]
if (persData.DATEOFBIRTH)
return [{
value: persData.DATEOFBIRTH,
id: persData.CONTACTID
}];
else
return [];
}
/**
......@@ -320,7 +323,7 @@ DataPrivacyUtils.getDSGVO = function(pContactId, pFilterCond)
KeywordUtils.getResolvedTitleSqlPart($KeywordRegistry.dsgvoType(), "DSGVOTYPE")) // 12 - dsgvotype-displayvalue)
.from("DSGVO")
.where("DSGVO.CONTACT_ID", pContactId)
.and(pFilterCond)
.andIfSet(pFilterCond)
.table();
}
......@@ -363,6 +366,8 @@ DataPrivacyUtils.collectAll = function(pContactId, pFilterCond)
data.forEach(function(pRow)
{
if(pRow.value == "")//when the value is empty there is no need to insert the records since they'd been deleted later in the function
return;
// search if it is already in DSGVO table
var found = false;
for (dat in contactDSGVO)
......@@ -415,7 +420,7 @@ DataPrivacyUtils.collectAll = function(pContactId, pFilterCond)
if (!pRow[4])
{
if (pRow[0])
deletes.push(["DSGVO", newWhere("DSGVO.DSGVOID", pRow[0])]);
deletes.push(["DSGVO", newWhere("DSGVO.DSGVOID", pRow[0]).build()]);
return false;
}
......
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