allowed null parent

This commit is contained in:
Joan Sanchez 2019-09-13 12:16:38 +02:00
parent 043fe80254
commit dd0c34d31b
1 changed files with 2 additions and 2 deletions

View File

@ -31,7 +31,7 @@ module.exports = Self => {
}
});
Self.getLeaves = async(zoneFk, parentFk = 1, filter) => {
Self.getLeaves = async(zoneFk, parentFk, filter) => {
let conn = Self.dataSource.connector;
let stmts = [];
@ -47,7 +47,7 @@ module.exports = Self => {
isIncluded TINYINT
) ENGINE = MEMORY`));
if (parentFk === 1) {
if (!parentFk) {
stmts.push(new ParameterizedSQL(
`INSERT INTO tmp.checkedChilds
SELECT