Skip to content

Commit

Permalink
Die if we can't find a week we're looking for.
Browse files Browse the repository at this point in the history
  • Loading branch information
davorg committed Dec 17, 2017
1 parent 04ab09d commit f9a4513
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions bin/new_invoice
Expand Up @@ -40,6 +40,7 @@ my $week_rs = $sch->resultset('Week');

foreach (@weeks) {
my $wk = $week_rs->find($_);
die "Can't find week [$_]\n" unless $wk;

unless ($wk->contract->customer->id == $contract->customer->id) {
warn 'Week ' . $wk->id . ' has no work for ' .
Expand Down

0 comments on commit f9a4513

Please sign in to comment.