mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2024-11-30 12:43:57 -06:00
Merge pull request #198 from roberthorlings/bugfix/rule-action-addtag
Bugfix for a bug when adding a tag in a rule
This commit is contained in:
commit
7921fc74fd
@ -47,7 +47,7 @@ class AddTag implements ActionInterface
|
||||
// journal has this tag maybe?
|
||||
$tag = Tag::firstOrCreateEncrypted(['tag' => $this->action->action_value, 'user_id' => Auth::user()->id]);
|
||||
|
||||
$count = $journal->tags()->where('id', $tag->id)->count();
|
||||
$count = $journal->tags()->where('tag_id', $tag->id)->count();
|
||||
if ($count == 0) {
|
||||
$journal->tags()->save($tag);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user