ソースを参照

fix currency service error

3.x
wallo 1年前
コミット
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
 

読み込み中…
キャンセル
保存