get_rate must always return a Decimal or int as value

issue3311
review987002
(transplanted from c816c3b544a82bfa339d93f6e41d5e6e35e084bb)

--HG--
extra : transplant_source : %C8%16%C3%B5D%A8%2B%FA3%9D%93%F6%E4%1D%5En5%E0%84%BB