[Rt-commit] rt branch, 4.4/serialize-json-initialdata, updated. rt-4.4.1-417-gd78f4a9
Shawn Moore
shawn at bestpractical.com
Wed Mar 22 19:05:51 EDT 2017
The branch, 4.4/serialize-json-initialdata has been updated
via d78f4a9363ceb6a472e4acc588dc2a1bf585a87e (commit)
from baf070eec607f951fe24e24a4fda0e93ade0a368 (commit)
Summary of changes:
lib/RT/Migrate/Serializer/JSON.pm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
- Log -----------------------------------------------------------------
commit d78f4a9363ceb6a472e4acc588dc2a1bf585a87e
Author: Shawn M Moore <shawn at bestpractical.com>
Date: Wed Mar 22 23:05:41 2017 +0000
Avoid undef warnings with sorting by sortorder
diff --git a/lib/RT/Migrate/Serializer/JSON.pm b/lib/RT/Migrate/Serializer/JSON.pm
index 0aabc36..37e82ae 100644
--- a/lib/RT/Migrate/Serializer/JSON.pm
+++ b/lib/RT/Migrate/Serializer/JSON.pm
@@ -260,7 +260,7 @@ sub _CanonicalizeManyToMany {
@{ $primary->{$primary_key} }
= grep defined,
map &$canonicalize_object,
- sort { $a->{SortOrder} <=> $b->{SortOrder}
+ sort { ($a->{SortOrder}||0) <=> ($b->{SortOrder}||0)
|| ($object_sorter ? $a->{$object_sorter} cmp $b->{$object_sorter} : 0) }
@{ $primary->{$primary_key} || [] };
-----------------------------------------------------------------------
More information about the rt-commit
mailing list