Merge pull request #9977 from surajshetty3416/fix-document-save-issue

fix(document): Check is_dirty only if action is save
This commit is contained in:
Suraj Shetty 2020-04-16 22:15:49 +05:30 committed by GitHub
commit 3f33e5ea70
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -21,7 +21,7 @@ frappe.ui.form.save = function (frm, action, callback, btn) {
remove_empty_rows();
$(frm.wrapper).addClass('validated-form');
if (frm.is_dirty() && check_mandatory()) {
if ((action !== 'Save' || frm.is_dirty()) && check_mandatory()) {
_call({
method: "frappe.desk.form.save.savedocs",
args: { doc: frm.doc, action: action },