mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-16 02:02:58 -07:00
Only validate condition operator if parameter is present
This commit is contained in:
parent
5a8797a6dd
commit
8c552d3086
1 changed files with 5 additions and 5 deletions
|
@ -732,12 +732,12 @@ def validate_conditions(custom_conditions):
|
||||||
validated_condition['parameter'] = parameter.lower()
|
validated_condition['parameter'] = parameter.lower()
|
||||||
validated_condition['type'] = parameter_type
|
validated_condition['type'] = parameter_type
|
||||||
|
|
||||||
if operator:
|
if operator:
|
||||||
if operator not in CUSTOM_CONDITION_TYPE_OPERATORS.get(parameter_type, []):
|
if operator not in CUSTOM_CONDITION_TYPE_OPERATORS.get(parameter_type, []):
|
||||||
logger.error("Tautulli Notifiers :: Invalid operator '%s' for parameter '%s' in custom condition: %s" % (operator, parameter, condition))
|
logger.error("Tautulli Notifiers :: Invalid operator '%s' for parameter '%s' in custom condition: %s" % (operator, parameter, condition))
|
||||||
return False
|
return False
|
||||||
|
|
||||||
validated_condition['operator'] = operator
|
validated_condition['operator'] = operator
|
||||||
|
|
||||||
if values:
|
if values:
|
||||||
if not isinstance(values, list):
|
if not isinstance(values, list):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue