fix: browse tree ancestors not converted in mariadb

This commit is contained in:
NGPixel 2020-04-24 00:07:15 -04:00
parent e0a0434622
commit 7c59bfed08
2 changed files with 4 additions and 2 deletions

View File

@ -227,7 +227,7 @@ module.exports = {
} else { } else {
builder.where('parent', args.parent) builder.where('parent', args.parent)
if (args.includeAncestors && curPage && curPage.ancestors.length > 0) { if (args.includeAncestors && curPage && curPage.ancestors.length > 0) {
builder.orWhereIn('id', curPage.ancestors) builder.orWhereIn('id', _.isString(curPage.ancestors) ? JSON.parse(curPage.ancestors) : curPage.ancestors)
} }
} }
}).orderBy([{ column: 'isFolder', order: 'desc' }, 'title']) }).orderBy([{ column: 'isFolder', order: 'desc' }, 'title'])

View File

@ -323,7 +323,9 @@ module.exports = () => {
kind: 'link', kind: 'link',
label: 'Home', label: 'Home',
target: '/', target: '/',
targetType: 'home' targetType: 'home',
visibilityMode: 'all',
visibilityGroups: null
} }
] ]
} }