This commit is contained in:
James Cole
2022-10-02 20:18:43 +02:00
parent d8a15e41e6
commit 6dfe93bc19

View File

@@ -51,7 +51,7 @@ class SetDescription implements ActionInterface
public function actOnArray(array $journal): bool public function actOnArray(array $journal): bool
{ {
/** @var TransactionJournal $journal */ /** @var TransactionJournal $journal */
$journal = 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']);
$before = $journal->description; $before = $journal->description;
DB::table('transaction_journals') DB::table('transaction_journals')
@@ -66,8 +66,8 @@ class SetDescription implements ActionInterface
$this->action->action_value $this->action->action_value
) )
); );
$journal->refresh(); $object->refresh();
event(new TriggeredAuditLog($this->action->rule, $journal, 'update_description', $before, $this->action->action_value)); event(new TriggeredAuditLog($this->action->rule, $object, 'update_description', $before, $this->action->action_value));
return true; return true;
} }