Merge pull request #13203 from prssanna/custom-print-format-fix

fix: check if df exists in get_formatted
This commit is contained in:
Prssanna Desai 2021-05-13 12:14:37 +05:30 committed by GitHub
commit 4b0e627c94
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -870,7 +870,7 @@ class BaseDocument(object):
from frappe.model.meta import get_default_df
df = get_default_df(fieldname)
if not currency:
if not currency and df:
currency = self.get(df.get("options"))
if not frappe.db.exists('Currency', currency, cache=True):
currency = None