mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2026-02-12 14:52:41 +00:00
🤖 Auto commit for release 'develop' on 2026-01-23
This commit is contained in:
@@ -43,15 +43,15 @@ class SetNotes implements ActionInterface
|
||||
|
||||
public function actOnArray(array $journal): bool
|
||||
{
|
||||
$dbNote = Note::where('noteable_id', $journal['transaction_journal_id'])->where('noteable_type', TransactionJournal::class)->first();
|
||||
$dbNote = Note::where('noteable_id', $journal['transaction_journal_id'])->where('noteable_type', TransactionJournal::class)->first();
|
||||
if (null === $dbNote) {
|
||||
$dbNote = new Note();
|
||||
$dbNote->noteable_id = $journal['transaction_journal_id'];
|
||||
$dbNote = new Note();
|
||||
$dbNote->noteable_id = $journal['transaction_journal_id'];
|
||||
$dbNote->noteable_type = TransactionJournal::class;
|
||||
$dbNote->text = '';
|
||||
$dbNote->text = '';
|
||||
}
|
||||
$oldNotes = $dbNote->text;
|
||||
$newNotes = $this->action->getValue($journal);
|
||||
$oldNotes = $dbNote->text;
|
||||
$newNotes = $this->action->getValue($journal);
|
||||
$dbNote->text = $newNotes;
|
||||
$dbNote->save();
|
||||
|
||||
@@ -63,7 +63,7 @@ class SetNotes implements ActionInterface
|
||||
));
|
||||
|
||||
/** @var TransactionJournal $object */
|
||||
$object = TransactionJournal::where('user_id', $journal['user_id'])->find($journal['transaction_journal_id']);
|
||||
$object = TransactionJournal::where('user_id', $journal['user_id'])->find($journal['transaction_journal_id']);
|
||||
|
||||
event(new TriggeredAuditLog($this->action->rule, $object, 'update_notes', $oldNotes, $newNotes));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user