mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2024-12-25 08:21:08 -06:00
This commit is contained in:
parent
5ba079e71c
commit
0c6e00666b
@ -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 */
|
||||
|
@ -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));
|
||||
|
@ -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));
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user