pick
gitea/salix/test This commit looks good Details

This commit is contained in:
Joan Sanchez 2019-09-13 13:26:50 +02:00
parent d30a21974d
commit 42aceaaf70
1 changed files with 3 additions and 1 deletions

View File

@ -88,7 +88,9 @@ module.exports = Self => {
FROM zoneGeo zg
LEFT JOIN zoneIncluded zi ON zi.geoFk = zg.id
AND zi.zoneFk = ?
WHERE zg.parentFk IS NULL OR zg.parentFk = ?) AS nst`, [zoneFk, parentFk]);
WHERE (? IS NULL AND zg.parentFk IS NULL)
OR (? IS NOT NULL AND zg.parentFk = ?)) AS nst`,
[zoneFk, parentFk, parentFk, parentFk]);
// Get nodes from depth greather than Origin
stmt.merge(conn.makeSuffix(filter));