mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-14 00:04:24 +00:00
Fix update error.
This commit is contained in:
@@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
use FireflyIII\Events\JournalSaved;
|
use FireflyIII\Events\JournalSaved;
|
||||||
use FireflyIII\Models\PiggyBankEvent;
|
use FireflyIII\Models\PiggyBankEvent;
|
||||||
|
use FireflyIII\Models\PiggyBankRepetition;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class UpdateJournalConnection
|
* Class UpdateJournalConnection
|
||||||
@@ -39,7 +40,11 @@ class UpdateJournalConnection
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
$piggyBank = $event->piggyBank()->first();
|
$piggyBank = $event->piggyBank()->first();
|
||||||
$repetition = $piggyBank->piggyBankRepetitions()->relevantOnDate($journal->date)->first();
|
$repetition = null;
|
||||||
|
if ($piggyBank) {
|
||||||
|
/** @var PiggyBankRepetition $repetition */
|
||||||
|
$repetition = $piggyBank->piggyBankRepetitions()->relevantOnDate($journal->date)->first();
|
||||||
|
}
|
||||||
|
|
||||||
if (is_null($repetition)) {
|
if (is_null($repetition)) {
|
||||||
return;
|
return;
|
||||||
|
Reference in New Issue
Block a user