Merge branch 'develop' of https://github.com/JC5/firefly-iii into develop

# By Robert Horlings
# Via James Cole (2) and Robert Horlings (1)
* 'develop' of https://github.com/JC5/firefly-iii:
  Bugfix for a bug when adding a tag in a rule
  Bugfix in redirect after creating a new rule
This commit is contained in:
James Cole 2016-02-24 14:49:42 +01:00
commit a2275ae111
2 changed files with 2 additions and 2 deletions

View File

@ -263,7 +263,7 @@ class RuleController extends Controller
// set value so create routine will not overwrite URL:
Session::put('rules.rule.create.fromStore', true);
return redirect(route('rules.rule.create', [$request->input('what')]))->withInput();
return redirect(route('rules.rule.create', [$ruleGroup]))->withInput();
}
// redirect to previous URL.

View File

@ -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);
}