Bläddra i källkod

fix currency service error

3.x
wallo 1 år sedan
förälder
incheckning
64b54d938f
1 ändrade filer med 4 tillägg och 1 borttagningar
  1. 4
    1
      app/Listeners/UpdateCurrencyRates.php

+ 4
- 1
app/Listeners/UpdateCurrencyRates.php Visa fil

@@ -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
 

Laddar…
Avbryt
Spara