mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-12-18 01:01:19 +00:00
Fix #1294
This commit is contained in:
@@ -110,6 +110,13 @@ class LinkController extends Controller
|
||||
}
|
||||
$other = $this->journalRepository->find($linkInfo['transaction_journal_id']);
|
||||
$alreadyLinked = $this->repository->findLink($journal, $other);
|
||||
|
||||
if($other->id === $journal->id) {
|
||||
Session::flash('error', trans('firefly.journals_link_to_self'));
|
||||
|
||||
return redirect(route('transactions.show', [$journal->id]));
|
||||
}
|
||||
|
||||
if ($alreadyLinked) {
|
||||
Session::flash('error', trans('firefly.journals_error_linked'));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user