mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-25 13:10:35 +00:00
Referring to Auth::user will not work from the command line.
Signed-off-by: James Cole <thegrumpydictator@gmail.com>
This commit is contained in:
@@ -46,7 +46,7 @@ class SetCategory implements ActionInterface
|
||||
public function act(TransactionJournal $journal): bool
|
||||
{
|
||||
$name = $this->action->action_value;
|
||||
$category = Category::firstOrCreateEncrypted(['name' => $name, 'user_id' => Auth::user()->id]);
|
||||
$category = Category::firstOrCreateEncrypted(['name' => $name, 'user_id' => $journal->user->id]);
|
||||
$journal->categories()->sync([$category->id]);
|
||||
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user