Skip to content

Firefly III: a personal finances manager

Bugfix for a bug when adding a tag in a rule

Robert Horlings1732acfee202
diff --git a/app/Rules/Actions/AddTag.php b/app/Rules/Actions/AddTag.php
index af28acc579..f1b4bd659f 100644
--- a/app/Rules/Actions/AddTag.php
+++ b/app/Rules/Actions/AddTag.php
@@ -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);
}