Last code optimization before release.

This commit is contained in:
James Cole
2018-07-28 10:45:16 +02:00
parent d35470a79e
commit 0c7b652a70
42 changed files with 217 additions and 301 deletions

View File

@@ -61,7 +61,11 @@ class SetCategory implements ActionInterface
$factory = app(CategoryFactory::class);
$factory->setUser($journal->user);
$category = $factory->findOrCreate(null, $name);
if (null === $category) {
Log::error(sprintf('Action SetCategory did not fire because "%s" did not result in a valid category.', $name));
return true;
}
$journal->categories()->detach();
// set category on transactions:
/** @var Transaction $transaction */