diff --git a/plinth/middleware.py b/plinth/middleware.py index 877749b86..827af8a48 100644 --- a/plinth/middleware.py +++ b/plinth/middleware.py @@ -69,7 +69,8 @@ class SetupMiddleware(MiddlewareMixin): if module.setup_helper.is_finished: exception = module.setup_helper.collect_result() if not exception: - messages.success(request, _('Application installed.')) + if not setup._is_module_essential(module): + messages.success(request, _('Application installed.')) else: if isinstance(exception, PackageException): error_string = getattr(exception, 'error_string', diff --git a/plinth/tests/test_middleware.py b/plinth/tests/test_middleware.py index 62abd7c32..9a54a2e84 100644 --- a/plinth/tests/test_middleware.py +++ b/plinth/tests/test_middleware.py @@ -122,6 +122,7 @@ class TestSetupMiddleware(TestCase): """Test that module installation result is collected properly.""" resolve.return_value.namespaces = ['mockapp'] module = Mock() + module.is_essential = False module.setup_helper.is_finished = True module.setup_helper.collect_result.return_value = None module.setup_helper.get_state.return_value = 'up-to-date'