From bcbcc87f4beee262ebf0dcb81a1ccdd6991cffb0 Mon Sep 17 00:00:00 2001 From: developsessions Date: Tue, 31 Jan 2023 23:16:13 +0100 Subject: [PATCH] fix: possible none value evaluation in get_formatted function --- frappe/model/base_document.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/frappe/model/base_document.py b/frappe/model/base_document.py index 783e879bff..d8d7cedd5a 100644 --- a/frappe/model/base_document.py +++ b/frappe/model/base_document.py @@ -1109,7 +1109,8 @@ class BaseDocument: df = get_default_df(fieldname) if ( - df.fieldtype == "Currency" + df + and df.fieldtype == "Currency" and not currency and (currency_field := df.get("options")) and (currency_value := self.get(currency_field))