Merge pull request #36076 from ruthra-kumar/possible_type_error_on_err_creation
fix: possible type error on ERR creation
diff --git a/erpnext/accounts/doctype/exchange_rate_revaluation/exchange_rate_revaluation.py b/erpnext/accounts/doctype/exchange_rate_revaluation/exchange_rate_revaluation.py
index c52ea24..3b5698b 100644
--- a/erpnext/accounts/doctype/exchange_rate_revaluation/exchange_rate_revaluation.py
+++ b/erpnext/accounts/doctype/exchange_rate_revaluation/exchange_rate_revaluation.py
@@ -258,8 +258,8 @@
new_balance_in_base_currency = 0
new_balance_in_account_currency = 0
- current_exchange_rate = calculate_exchange_rate_using_last_gle(
- company, d.account, d.party_type, d.party
+ current_exchange_rate = (
+ calculate_exchange_rate_using_last_gle(company, d.account, d.party_type, d.party) or 0.0
)
gain_loss = new_balance_in_account_currency - (