fix: Avoid update_order twice on Kanban load (#19011)

* fix: Avoid `update_order` twice on kanban load

- The older logic called `kanban.update()` on a refresh (not on load) and returned from `render()`
- Due to a recent PR, it calls `kanban.update()` AND builds a new board on load, which invokes `update_order` twice consecutively and causes a timestamp error to be thrown

* chore: Remove redundant condition

Co-authored-by: Ritwik Puri <ritwikpuri5678@gmail.com>
This commit is contained in:
Marica 2022-11-25 20:55:16 +05:30 committed by GitHub
parent a14367f1d9
commit a4db4550e9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -175,9 +175,7 @@ frappe.views.KanbanView = class KanbanView extends frappe.views.ListView {
cur_list: this,
user_settings: this.view_user_settings,
});
}
if (this.kanban && board_name === this.kanban.board_name) {
} else if (board_name === this.kanban.board_name) {
this.kanban.update(this.data);
}
}