X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/deb4d2dbb676d7d6f69dfe7815d6e0cb09bd4a44..53593baa211863fbf66540cf1bcc36c8fb37257f:/SL/DB/Helper/AttrSorted.pm diff --git a/SL/DB/Helper/AttrSorted.pm b/SL/DB/Helper/AttrSorted.pm index 77c5f19bc..67c44410d 100644 --- a/SL/DB/Helper/AttrSorted.pm +++ b/SL/DB/Helper/AttrSorted.pm @@ -29,7 +29,7 @@ sub _make_sorted { croak 'not an accessor' if @_ > 1; - my $next_position = (max map { $_->$position_sub // 0 } @{ $self->$unsorted_sub }) + 1; + my $next_position = ((max map { $_->$position_sub // 0 } @{ $self->$unsorted_sub }) // 0) + 1; return [ map { $_->[1] } sort { $a->[0] <=> $b->[0] }