Browse Source

fix: wait until attach is cleared before saving

version-14
Shariq Ansari 3 years ago
parent
commit
d30f9e1d78
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      frappe/public/js/frappe/form/controls/attach.js

+ 2
- 2
frappe/public/js/frappe/form/controls/attach.js View File

@@ -37,8 +37,8 @@ frappe.ui.form.ControlAttach = class ControlAttach extends frappe.ui.form.Contro
if(this.frm) {
me.parse_validate_and_set_in_model(null);
me.refresh();
me.frm.attachments.remove_attachment_by_filename(me.value, function() {
me.parse_validate_and_set_in_model(null);
me.frm.attachments.remove_attachment_by_filename(me.value, async () => {
await me.parse_validate_and_set_in_model(null);
me.refresh();
me.frm.doc.docstatus == 1 ? me.frm.save('Update') : me.frm.save();
});


Loading…
Cancel
Save