[Rt-commit] rt branch, 4.4/custom-role-serializer, updated. rt-4.4.2-3-ga338922
Shawn Moore
shawn at bestpractical.com
Tue Oct 10 11:32:18 EDT 2017
The branch, 4.4/custom-role-serializer has been updated
via a338922877f1e0eae85f473a448ad1d4938b046f (commit)
from 0e101d521a95998a4e45c40e5b85ce27843035a9 (commit)
Summary of changes:
lib/RT.pm | 2 ++
1 file changed, 2 insertions(+)
- Log -----------------------------------------------------------------
commit a338922877f1e0eae85f473a448ad1d4938b046f
Author: Shawn M Moore <shawn at bestpractical.com>
Date: Tue Oct 10 15:31:18 2017 +0000
Force custom role classes to be initialized for rt-importer
Without this, you get errors like:
Can't use an undefined value as a HASH reference at
/opt/rt4/sbin/../lib/RT/Record.pm line 2534.
(/opt/rt4/sbin/../lib/RT/Migrate/Importer/File.pm:97)
This is because _ClassAccessible returns undef, since
_BuildTableAttributes was never called, so $_TABLE_ATTR->{$class} is
empty. For ordinary codepaths, it's still called in _Init, but for
rt-importer, we need to explicitly call it as we don't instantiate
custom role objects using the normal means.
diff --git a/lib/RT.pm b/lib/RT.pm
index 5775bdf..fdabcd1 100644
--- a/lib/RT.pm
+++ b/lib/RT.pm
@@ -546,6 +546,8 @@ sub _BuildTableAttributes {
RT::ObjectClass
RT::ObjectTopic
RT::Topic
+ RT::CustomRole
+ RT::ObjectCustomRole
);
}
-----------------------------------------------------------------------
More information about the rt-commit
mailing list