[Rt-commit] rt branch, master, updated. rt-4.2.12-503-gde00830

Shawn Moore shawn at bestpractical.com
Mon Nov 2 17:30:45 EST 2015


The branch, master has been updated
       via  de008300f74f2f73b023e3c7f6310ce655adb1e8 (commit)
      from  0ff61967703af938f50930b4b69fd08a3b511b36 (commit)

Summary of changes:
 lib/RT.pm                 | 2 +-
 sbin/rt-setup-database.in | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

- Log -----------------------------------------------------------------
commit de008300f74f2f73b023e3c7f6310ce655adb1e8
Author: Shawn M Moore <shawn at bestpractical.com>
Date:   Mon Nov 2 17:27:51 2015 -0500

    Avoid upgrades warning before custom roles table is created

diff --git a/lib/RT.pm b/lib/RT.pm
index a8749b7..104cf2e 100644
--- a/lib/RT.pm
+++ b/lib/RT.pm
@@ -199,7 +199,7 @@ sub Init {
     InitPlugins();
     _BuildTableAttributes();
     RT::I18N->Init;
-    RT::CustomRoles->RegisterRoles;
+    RT::CustomRoles->RegisterRoles unless $args{SkipCustomRoles};
     RT->Config->PostLoadCheck;
     RT::Lifecycle->FillCache;
 }
diff --git a/sbin/rt-setup-database.in b/sbin/rt-setup-database.in
index 339912f..2b8a49b 100644
--- a/sbin/rt-setup-database.in
+++ b/sbin/rt-setup-database.in
@@ -353,7 +353,8 @@ sub action_insert {
     my %args = @_;
     unless ($RAN_INIT) {
         $RT::Handle = RT::Handle->new;
-        RT::Init();
+        my $has_custom_roles = grep { lc($_) eq 'customroles' } $RT::Handle->_TableNames;
+        RT::Init(SkipCustomRoles => !$has_custom_roles);
         $RAN_INIT++;
     }
     $log_actions = 1;

-----------------------------------------------------------------------


More information about the rt-commit mailing list