Skip to content

Commit

Permalink
Fixed a bug in saving options.
Browse files Browse the repository at this point in the history
  • Loading branch information
davorg committed Sep 3, 2014
1 parent c1c842d commit 7d3f58a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Kinza/lib/Kinza.pm
Expand Up @@ -81,18 +81,18 @@ post '/save' => sub {

if ($terms != $term_rs->count) {
session 'error' => 'You must register for four terms of courses';
redirect '/';
return redirect '/';
}

if (keys %courses != keys %params) {
session 'error' => 'You must register for a different course each term';
redirect '/';
return redirect '/';
}

if (@unavailable) {
session 'error', 'The following courses are full for your chosen terms:' .
'<ul><li>' . join('</li><li>', @unavailable) . '</li></ul>';
redirect '/';
return redirect '/';
}

# Save the data
Expand Down

0 comments on commit 7d3f58a

Please sign in to comment.