Skip to content

Commit

Permalink
fix(workflow): move dom unfreeze to finally (backport #20161) (#20176)
Browse files Browse the repository at this point in the history
* fix(workflow): move dom unfreeze to `finally` (#20161)

* fix(workflow): move dom unfreeze to `finally`

* fix: keep only unfreeze in `finally`

(cherry picked from commit d8ca421)

# Conflicts:
#	frappe/public/js/frappe/form/workflow.js

* chore: conflicts

---------

Co-authored-by: Dany Robert <rtdany10@gmail.com>
Co-authored-by: Ankush Menat <ankushmenat@gmail.com>
  • Loading branch information
3 people committed Feb 28, 2023
1 parent dca7c38 commit 14abb0e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion frappe/public/js/frappe/form/workflow.js
Expand Up @@ -95,11 +95,13 @@ frappe.ui.form.States = Class.extend({
frappe.xcall('frappe.model.workflow.apply_workflow',
{doc: me.frm.doc, action: d.action})
.then((doc) => {
frappe.dom.unfreeze();
frappe.model.sync(doc);
me.frm.refresh();
me.frm.selected_workflow_action = null;
me.frm.script_manager.trigger("after_workflow_action");
})
.finally(() => {
frappe.dom.unfreeze();
});
});
});
Expand Down

0 comments on commit 14abb0e

Please sign in to comment.