fix: Don't overwrite source_name if source_name is defined (bp #12280) (#12341)

Co-authored-by: Richard Case <64409021+casesolved-co-uk@users.noreply.github.com>
Co-authored-by: Suraj Shetty <13928957+surajshetty3416@users.noreply.github.com>
This commit is contained in:
mergify[bot] 2021-02-07 12:49:43 +05:30 committed by GitHub
parent 4d9b8f86f6
commit 1133f40dd2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -362,9 +362,7 @@ $.extend(frappe.model, {
);
} else if (!opts.source_name && opts.frm) {
opts.source_name = opts.frm.doc.name;
// Allow opening a mapped doc without a source document name
} else if (!opts.frm) {
} else if (!opts.frm && !opts.source_name) {
opts.source_name = null;
}