From 1732acfee202af488f85e4008c287ee922cf2d4d Mon Sep 17 00:00:00 2001 From: Robert Horlings Date: Wed, 24 Feb 2016 14:06:11 +0100 Subject: [PATCH] Bugfix for a bug when adding a tag in a rule --- app/Rules/Actions/AddTag.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); }