mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-11 15:56:07 -07:00
Attempt at fixing custom condition json error
This commit is contained in:
parent
b5c52ac71e
commit
87d2d273d3
4 changed files with 20 additions and 21 deletions
|
@ -208,13 +208,7 @@ def notify_custom_conditions(notifier_id=None, parameters=None):
|
|||
notifier_config = notifiers.get_notifier_config(notifier_id=notifier_id)
|
||||
|
||||
custom_conditions_logic = notifier_config['custom_conditions_logic']
|
||||
try:
|
||||
custom_conditions = json.loads(notifier_config['custom_conditions']) or []
|
||||
except ValueError as e:
|
||||
logger.error(u"Tautulli NotificationHandler :: Unable to parse custom condition: %s." % e)
|
||||
logger.debug(u"Tautulli NotificationHandler :: Custom conditions json: %s "
|
||||
% notifier_config['custom_conditions'])
|
||||
custom_conditions = []
|
||||
custom_conditions = notifier_config['custom_conditions']
|
||||
|
||||
if custom_conditions_logic or any(c for c in custom_conditions if c['value']):
|
||||
logger.debug(u"Tautulli NotificationHandler :: Checking custom notification conditions for notifier_id %s."
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue