Просмотр исходного кода

fix currency service error

3.x
wallo 1 год назад
Родитель
Сommit
64b54d938f
1 измененных файлов: 4 добавлений и 1 удалений
  1. 4
    1
      app/Listeners/UpdateCurrencyRates.php

+ 4
- 1
app/Listeners/UpdateCurrencyRates.php Просмотреть файл

@@ -4,6 +4,7 @@ namespace App\Listeners;
4 4
 
5 5
 use App\Contracts\CurrencyHandler;
6 6
 use App\Events\DefaultCurrencyChanged;
7
+use App\Facades\Forex;
7 8
 use App\Models\Setting\Currency;
8 9
 use Illuminate\Support\Facades\DB;
9 10
 
@@ -29,7 +30,9 @@ readonly class UpdateCurrencyRates
29 30
                 $defaultCurrency->update(['rate' => 1]);
30 31
             }
31 32
 
32
-            $this->updateOtherCurrencyRates($defaultCurrency);
33
+            if (Forex::isEnabled()) {
34
+                $this->updateOtherCurrencyRates($defaultCurrency);
35
+            }
33 36
         });
34 37
     }
35 38
 

Загрузка…
Отмена
Сохранить