diff --git a/Koha/REST/Plugin/PluginRoutes.pm b/Koha/REST/Plugin/PluginRoutes.pm index 67ff2ae1cf..a90eb81133 100644 --- a/Koha/REST/Plugin/PluginRoutes.pm +++ b/Koha/REST/Plugin/PluginRoutes.pm @@ -45,8 +45,7 @@ sub register { my @plugins; - if ( C4::Context->config("enable_plugins") and - ! C4::Context->needs_install ) # Koha is installed + if ( C4::Context->config("enable_plugins") ) { # plugin needs to define a namespace @plugins = Koha::Plugins->new()->GetPlugins( diff --git a/Koha/REST/V1.pm b/Koha/REST/V1.pm index 0b14b97b95..894457b0c8 100644 --- a/Koha/REST/V1.pm +++ b/Koha/REST/V1.pm @@ -86,7 +86,7 @@ sub startup { spec => $spec, validator => undef } - ); + ) unless C4::Context->needs_install; # load only if Koha is installed $self->plugin( OpenAPI => { @@ -115,7 +115,7 @@ sub startup { spec => $spec, validator => $validator } - ); + ) unless C4::Context->needs_install; # load only if Koha is installed $self->plugin( OpenAPI => {