mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-13 08:42:59 -07:00
Add tilde for blank condition values
This commit is contained in:
parent
a2b2d1d227
commit
70e88a9013
2 changed files with 4 additions and 1 deletions
|
@ -192,6 +192,9 @@
|
||||||
Add custom conditions to only <em>allow certain notifications</em>. By default, all notifications will be sent if there are no conditions.
|
Add custom conditions to only <em>allow certain notifications</em>. By default, all notifications will be sent if there are no conditions.
|
||||||
<a href="#notify-text-sub-modal" data-toggle="modal">Click here</a> for a description of all the parameters.
|
<a href="#notify-text-sub-modal" data-toggle="modal">Click here</a> for a description of all the parameters.
|
||||||
</p>
|
</p>
|
||||||
|
<p class="help-block">
|
||||||
|
A tilde (<span class="inline-pre">~</span>) can be entered as a value to indicate a empty string.
|
||||||
|
</p>
|
||||||
<div id="condition-widget"></div>
|
<div id="condition-widget"></div>
|
||||||
<input type="hidden" id="custom_conditions" name="custom_conditions" />
|
<input type="hidden" id="custom_conditions" name="custom_conditions" />
|
||||||
|
|
||||||
|
|
|
@ -295,7 +295,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 = [str(v).lower() for v in values]
|
values = ['' if v == '~' else str(v).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]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue