projects
/
kivitendo-erp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'b-3.6.1' of ../kivitendo-erp_20220811
[kivitendo-erp.git]
/
SL
/
DB
/
Helper
/
AttrSorted.pm
diff --git
a/SL/DB/Helper/AttrSorted.pm
b/SL/DB/Helper/AttrSorted.pm
index
77c5f19
..
67c4441
100644
(file)
--- 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;
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] }
return [
map { $_->[1] }
sort { $a->[0] <=> $b->[0] }