fix: handle None in last_valuation_rate check

(cherry picked from commit a3058bf8cc)
This commit is contained in:
Kavin
2025-11-01 18:16:20 +05:30
committed by Mergify
parent b5f8f2b6fa
commit e3110b3993

View File

@@ -1914,7 +1914,7 @@ def get_valuation_rate(
)
last_valuation_rate = query.run()
if last_valuation_rate:
if last_valuation_rate and last_valuation_rate[0][0] is not None:
return flt(last_valuation_rate[0][0])
# Get moving average rate of a specific batch number