This commit is contained in:
James Cole
2019-08-30 07:28:48 +02:00
parent 6d3b8e7def
commit 6a06ab35c9
3 changed files with 164 additions and 147 deletions

View File

@@ -28,6 +28,7 @@ use FireflyIII\User;
/**
* Class TransactionGroupFactory
*
* @codeCoverageIgnore
*/
class TransactionGroupFactory
@@ -58,7 +59,12 @@ class TransactionGroupFactory
$collection = $this->journalFactory->create($data);
$title = $data['group_title'] ?? null;
$title = '' === $title ? null : $title;
$group = new TransactionGroup;
if (null !== $title) {
$title = substr($title, 0, 255);
}
$group = new TransactionGroup;
$group->user()->associate($this->user);
$group->title = $title;
$group->save();