|
@@ -177,9 +177,8 @@ module.exports = app => {
|
|
|
conn.update(this.tableName, updateData);
|
|
|
result.push(updateData);
|
|
|
if (posterity.length > 0) {
|
|
|
- const posterityUpdateData = posterity.map(x => { return { id: x.id, filing_type }});
|
|
|
+ const posterityUpdateData = posterity.map(x => { return { id: x.id, filing_type, tree_level: parent.tree_level + 1 - filing.tree_level + x.tree_level }});
|
|
|
conn.updateRows(this.tableName, posterityUpdateData);
|
|
|
- // result.push(...posterity);
|
|
|
}
|
|
|
const siblingUpdateData = [];
|
|
|
if (data.tree_pid === filing.tree_pid) {
|