1fcef255a6
floatformat() returns a str; saving that to ExchangeRate.rate (FloatField) via create() leaves the Python instance attribute as a str. Reading it back on the same instance (rate = exchange_rate.rate) then caused `purchase.price * rate` to fail with "can't multiply sequence by non-int of type 'float'". Fix: pass the raw float from the API directly to ExchangeRate.objects.create. Also replace floatformat(..., 0) on the converted price with round(..., 2) to keep a numeric type throughout. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>