temlates: make usage of plugin_ini safer in error pages.

This commit is contained in:
Marcin Kuzminski 2020-03-31 19:59:39 +02:00
parent fef1c89222
commit d2b6a3fa58

View file

@ -2,7 +2,7 @@
<script>
var CHANNELSTREAM_URLS = ${config['url_gen'](request)|n};
%if request.registry.rhodecode_plugins['channelstream']['enabled'] and c.rhodecode_user.username != h.DEFAULT_USER:
%if request.registry.rhodecode_plugins['channelstream']['enabled'] and getattr(c.rhodecode_user, 'username', '') != h.DEFAULT_USER:
var CHANNELSTREAM_SETTINGS = {
'enabled': true,
'ws_location': '${request.registry.settings.get('channelstream.ws_url')}',