on amend, retain the existing attachments

This commit is contained in:
Anand Doshi 2012-07-09 10:19:00 +05:30
parent 562a71f153
commit 730c64abc4

View file

@ -962,7 +962,7 @@ _f.Frm.prototype.copy_doc = function(onload, from_amend) {
var newdoc = LocalDB.copy(this.doctype, dn, from_amend);
// do not copy attachments
if(this.meta.allow_attach && newdoc.file_list)
if(this.meta.allow_attach && newdoc.file_list && !from_amend)
newdoc.file_list = null;
// copy chidren