Skip to content

Commit

Permalink
Fix redefined variable.
Browse files Browse the repository at this point in the history
  • Loading branch information
davorg committed Jul 30, 2016
1 parent 4a30a1c commit 1961c5a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions step12/Todo/lib/Todo.pm
Expand Up @@ -59,9 +59,9 @@ post '/add' => sub {
return template 'add', { errors => \@errors, item => $item };
}

my $item = resultset('Item')->create($item);
my $new_item = resultset('Item')->create($item);
foreach my $tag (@tags) {
$item->add_to_tags({ name => $tag });
$new_item->add_to_tags({ name => $tag });
}
redirect('/');
};
Expand Down

0 comments on commit 1961c5a

Please sign in to comment.