mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-10 23:42:37 -07:00
Add blank defaults to conditions and parameters
This commit is contained in:
parent
42b1a0d3de
commit
2e83b42ba9
2 changed files with 12 additions and 6 deletions
|
@ -2950,10 +2950,16 @@ class WebInterface(object):
|
|||
def get_notifier_config_modal(self, notifier_id=None, **kwargs):
|
||||
result = notifiers.get_notifier_config(notifier_id=notifier_id)
|
||||
|
||||
parameters = [
|
||||
{'name': param['name'], 'type': param['type'], 'value': param['value']}
|
||||
for category in common.NOTIFICATION_PARAMETERS
|
||||
for param in category['parameters']
|
||||
if not result['custom_conditions']:
|
||||
result['custom_conditions'] = json.dumps([{'coefficient': '', 'operator': '', 'value': ''}])
|
||||
|
||||
if not result['custom_conditions_logic']:
|
||||
result['custom_conditions_logic'] = ''
|
||||
|
||||
parameters = [{'name': '', 'type': '', 'value': ''}]
|
||||
parameters += [
|
||||
{'name': param['name'], 'type': param['type'], 'value': param['value']}
|
||||
for category in common.NOTIFICATION_PARAMETERS for param in category['parameters']
|
||||
]
|
||||
|
||||
return serve_template(templatename="notifier_config.html", notifier=result, parameters=json.dumps(parameters))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue