mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2026-02-11 06:01:36 +00:00
🤖 Auto commit for release 'develop' on 2026-01-24
This commit is contained in:
@@ -62,17 +62,17 @@ class AppendNotesToDescription implements ActionInterface
|
||||
|
||||
return false;
|
||||
}
|
||||
$note = $object->notes()->first();
|
||||
$note = $object->notes()->first();
|
||||
if (null === $note) {
|
||||
Log::debug('Journal has no notes.');
|
||||
$note = new Note();
|
||||
$note = new Note();
|
||||
$note->noteable()->associate($object);
|
||||
$note->text = '';
|
||||
}
|
||||
// only append if there is something to append
|
||||
if ('' !== $note->text) {
|
||||
$before = $object->description;
|
||||
$object->description = trim(sprintf('%s %s', $object->description, (string)$this->clearString($note->text)));
|
||||
$object->description = trim(sprintf('%s %s', $object->description, (string) $this->clearString($note->text)));
|
||||
$object->save();
|
||||
Log::debug(sprintf('Journal description is updated to "%s".', $object->description));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user