mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
Last code optimization before release.
This commit is contained in:
@@ -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 */
|
||||
|
Reference in New Issue
Block a user