Catch for the same rate

This commit is contained in:
James Cole
2023-12-22 06:25:38 +01:00
parent f69072d293
commit f0517aee53

View File

@@ -149,6 +149,9 @@ class ExchangeRateConverter
private function getFromDB(int $from, int $to, string $date): ?string
{
if($from === $to) {
return '1';
}
$key = sprintf('cer-%d-%d-%s', $from, $to, $date);
// perhaps the rate has been cached during this particular run