|
@@ -54,7 +54,7 @@ module.exports = app => {
|
|
|
const insertData = [];
|
|
|
for (const f of templateFiling) {
|
|
|
f.newId = this.uuid.v4();
|
|
|
- const parent = f.tree_pid === rootId ? templateFiling.find(x => { x.id === f.tree_pid; }) : null;
|
|
|
+ const parent = f.tree_pid !== rootId ? templateFiling.find(x => { return x.id === f.tree_pid; }) : null;
|
|
|
const newData = {
|
|
|
id: f.newId, tree_pid : parent ? parent.newId : rootId, tree_level: f.tree_level, tree_order: f.tree_order,
|
|
|
spid, add_user_id: this.ctx.session.sessionUser.accountId, is_fixed: f.tree_level === 1,
|