Skip to content

Firefly III: a personal finances manager

Fix method.

James Colea9d490263b0f
diff --git a/app/Jobs/DownloadExchangeRates.php b/app/Jobs/DownloadExchangeRates.php
index 79c944537b..552c310778 100644
--- a/app/Jobs/DownloadExchangeRates.php
+++ b/app/Jobs/DownloadExchangeRates.php
@@ -84,7 +84,7 @@ class DownloadExchangeRates implements ShouldQueue
public function handle(): void
{
Log::debug('Now in handle()');
- $currencies = $this->repository->get();
+ $currencies = $this->repository->getCompleteSet();
/** @var TransactionCurrency $currency */
foreach ($currencies as $currency) {
diff --git a/app/Repositories/Currency/CurrencyRepository.php b/app/Repositories/Currency/CurrencyRepository.php
index 39684f8a41..f24e90b44b 100644
--- a/app/Repositories/Currency/CurrencyRepository.php
+++ b/app/Repositories/Currency/CurrencyRepository.php
@@ -201,6 +201,17 @@ class CurrencyRepository implements CurrencyRepositoryInterface
return $all;
}
+ /**
+ * Returns the complete set of transactions but needs
+ * no user object.
+ *
+ * @return Collection
+ */
+ public function getCompleteSet(): Collection
+ {
+ return TransactionCurrency::orderBy('code', 'ASC')->get();
+ }
+
/**
* @param TransactionCurrency $currency
*
diff --git a/app/Repositories/Currency/CurrencyRepositoryInterface.php b/app/Repositories/Currency/CurrencyRepositoryInterface.php
index ff8c1c8d1d..40efbc2608 100644
--- a/app/Repositories/Currency/CurrencyRepositoryInterface.php
+++ b/app/Repositories/Currency/CurrencyRepositoryInterface.php
@@ -37,6 +37,15 @@ use Illuminate\Support\Collection;
*/
interface CurrencyRepositoryInterface
{
+
+ /**
+ * Returns the complete set of transactions but needs
+ * no user object.
+ *
+ * @return Collection
+ */
+ public function getCompleteSet(): Collection;
+
/**
* @param TransactionCurrency $currency
*