[FIX] im_livechat: channel info: available key

should be the length of the recordset of connected users, not the recordset
itself, which is always evaluated as True (thus, the im_livechat script was
always embedded in the html pages).
This commit is contained in:
Aaron Bohy
2015-12-29 09:41:18 +01:00
parent 7cee96fcd4
commit 1d371e94f6
@@ -195,7 +195,7 @@ class ImLivechatChannel(models.Model):
@api.model
def get_livechat_info(self, channel_id, username='Visitor'):
info = {}
info['available'] = self.browse(channel_id).get_available_users(),
info['available'] = len(self.browse(channel_id).get_available_users())
if info['available']:
info['server_url'] = self.env['ir.config_parameter'].get_param('web.base.url')
info['options'] = self.sudo().get_channel_infos(channel_id)