Fix #11281 and some other stuff.

This commit is contained in:
James Cole
2025-11-28 19:01:15 +01:00
parent 1dd098a283
commit 3711222f9e
87 changed files with 260 additions and 167 deletions

View File

@@ -25,6 +25,7 @@ declare(strict_types=1);
namespace FireflyIII\Support\Observers;
use FireflyIII\Support\Facades\Preferences;
use FireflyIII\Models\AvailableBudget;
use FireflyIII\Models\Budget;
use FireflyIII\Models\BudgetLimit;
@@ -161,7 +162,7 @@ trait RecalculatesAvailableBudgetsTrait
// either overlap multiple available budget periods or be contained in a single one.
// all have to be created or updated.
try {
$viewRange = app('preferences')->getForUser($user, 'viewRange', '1M')->data;
$viewRange = Preferences::getForUser($user, 'viewRange', '1M')->data;
} catch (ContainerExceptionInterface|NotFoundExceptionInterface $e) {
Log::error($e->getMessage());
$viewRange = '1M';