Unverified Commit 919d7c12 authored by Thomas Nilefalk's avatar Thomas Nilefalk Committed by GitHub

fix: syntax error in rebuild-tree.js (#3048)

parent 5e0236ca
......@@ -57,7 +57,7 @@ module.exports = async (pageId) => {
await WIKI.models.knex.table('pageTree').truncate()
if (tree.length > 0) {
// -> Save in chunks, because of per query max parameters (35k Postgres, 2k MSSQL, 1k for SQLite)
if ((WIKI.config.db.type !== 'sqlite'))
if ((WIKI.config.db.type !== 'sqlite')) {
for (const chunk of _.chunk(tree, 100)) {
await WIKI.models.knex.table('pageTree').insert(chunk)
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment