Merge pull request #38693 from frappe/mergify/bp/version-15-hotfix/pr-38692

fix: typeerror on new sites (backport #38692)
This commit is contained in:
ruthra kumar 2023-12-12 16:03:08 +05:30 committed by GitHub
commit b68e1f6ea6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -8,7 +8,7 @@ $.extend(erpnext, {
if(!company && cur_frm)
company = cur_frm.doc.company;
if(company)
return frappe.get_doc(":Company", company).default_currency || frappe.boot.sysdefaults.currency;
return frappe.get_doc(":Company", company)?.default_currency || frappe.boot.sysdefaults.currency;
else
return frappe.boot.sysdefaults.currency;
},