# HG changeset patch # User Marcin Kuzminski # Date 2017-03-02 09:44:51 # Node ID 1047cf00a7f9e64068d1b4a7fbe2bc4b24a83b23 # Parent cf3f95ff106bb1c4fea27594da3e319320de3195 notifications: skip fetching of settings in notifications. - we can re-use the .CONFIG object. diff --git a/rhodecode/model/notification.py b/rhodecode/model/notification.py --- a/rhodecode/model/notification.py +++ b/rhodecode/model/notification.py @@ -324,24 +324,15 @@ class EmailNotificationModel(BaseModel): """ super(EmailNotificationModel, self).__init__() - self.rhodecode_instance_name = None + self.rhodecode_instance_name = rhodecode.CONFIG.get('rhodecode_title') def _update_kwargs_for_render(self, kwargs): """ Inject params required for Mako rendering :param kwargs: - :return: """ - rhodecode_name = self.rhodecode_instance_name - if not rhodecode_name: - try: - rc_config = SettingsModel().get_all_settings() - except Exception: - log.exception('failed to fetch settings') - rc_config = {} - rhodecode_name = rc_config.get('rhodecode_title', '') - kwargs['rhodecode_instance_name'] = rhodecode_name + kwargs['rhodecode_instance_name'] = self.rhodecode_instance_name _kwargs = { 'instance_url': h.url('home', qualified=True),