mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-08-20 21:33:18 -07:00
Strip whitespace from condition values
This commit is contained in:
parent
87d3c0ae81
commit
6807cebe51
1 changed files with 2 additions and 2 deletions
|
@ -294,7 +294,7 @@ def notify_custom_conditions(notifier_id=None, parameters=None):
|
||||||
# Cast the condition values to the correct type
|
# Cast the condition values to the correct type
|
||||||
try:
|
try:
|
||||||
if parameter_type == 'str':
|
if parameter_type == 'str':
|
||||||
values = ['' if v == '~' else str(v).lower() for v in values]
|
values = ['' if v == '~' else str(v).strip().lower() for v in values]
|
||||||
|
|
||||||
elif parameter_type == 'int':
|
elif parameter_type == 'int':
|
||||||
values = [helpers.cast_to_int(v) for v in values]
|
values = [helpers.cast_to_int(v) for v in values]
|
||||||
|
@ -313,7 +313,7 @@ def notify_custom_conditions(notifier_id=None, parameters=None):
|
||||||
# Cast the parameter value to the correct type
|
# Cast the parameter value to the correct type
|
||||||
try:
|
try:
|
||||||
if parameter_type == 'str':
|
if parameter_type == 'str':
|
||||||
parameter_value = str(parameter_value).lower()
|
parameter_value = str(parameter_value).strip().lower()
|
||||||
|
|
||||||
elif parameter_type == 'int':
|
elif parameter_type == 'int':
|
||||||
parameter_value = helpers.cast_to_int(parameter_value)
|
parameter_value = helpers.cast_to_int(parameter_value)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue