Follow up for issue #1276 - only set channel data if matrix exists.

This commit is contained in:
Martin Edenhofer 2017-10-09 17:01:25 +02:00
parent fb8f07e6e9
commit ac8ae54841

View file

@ -135,12 +135,13 @@ class Index extends App.ControllerSubContent
}
# check missing channels
for key, value of params['notification_config']['matrix']
if !value.channel
value.channel = {
email: false
online: true
}
if params['notification_config']
for key, value of params['notification_config']['matrix']
if !value.channel
value.channel = {
email: false
online: true
}
if !params.notification_config.group_ids || _.isEmpty(params.notification_config.group_ids)
params.notification_config.group_ids = ['-']