James Cole 2022-11-01 19:33:43 +01:00
parent 5ba079e71c
commit 0c6e00666b
No known key found for this signature in database
GPG Key ID: B49A324B7EAD6D80
3 changed files with 4 additions and 5 deletions

View File

@ -97,8 +97,6 @@ class DestroyController extends Controller
$this->groupRepository->destroy($transactionGroup);
// trigger just after destruction
event(new DestroyedTransactionGroup($transactionGroup));
app('preferences')->mark();
/** @var Account $account */

View File

@ -23,6 +23,7 @@ declare(strict_types=1);
namespace FireflyIII\Http\Controllers\Transaction;
use FireflyIII\Events\DestroyedTransactionGroup;
use FireflyIII\Events\UpdatedAccount;
use FireflyIII\Http\Controllers\Controller;
use FireflyIII\Models\Account;
@ -131,9 +132,6 @@ class DeleteController extends Controller
$this->repository->destroy($group);
app('preferences')->mark();
/** @var Account $account */
foreach($accounts as $account) {
Log::debug(sprintf('Now going to trigger updated account event for account #%d', $account->id));

View File

@ -24,6 +24,7 @@ declare(strict_types=1);
namespace FireflyIII\Services\Internal\Destroy;
use Exception;
use FireflyIII\Events\DestroyedTransactionGroup;
use FireflyIII\Models\TransactionGroup;
/**
@ -49,6 +50,8 @@ class TransactionGroupDestroyService
} catch (Exception $e) { // @phpstan-ignore-line
// @ignoreException
}
// trigger just after destruction
event(new DestroyedTransactionGroup($transactionGroup));
}
}