From d1be2d6ac1234af9ab506a1d4cdb7a8455029d35 Mon Sep 17 00:00:00 2001 From: joeperpetua Date: Fri, 13 Sep 2024 03:56:05 +0200 Subject: [PATCH] Remove unnecesary ternary --- synology_api/task_scheduler.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/synology_api/task_scheduler.py b/synology_api/task_scheduler.py index 464ebb9..2560fb5 100644 --- a/synology_api/task_scheduler.py +++ b/synology_api/task_scheduler.py @@ -618,9 +618,9 @@ def create_script_task( schedule_dict = schedule._generate_dict() extra = { - 'notify_enable': 'true' if notify_email is not '' else 'false', + 'notify_enable': notify_email != '', 'notify_mail': notify_email, - 'notify_if_error': 'true' if notify_only_on_error else 'false', + 'notify_if_error': notify_only_on_error, 'script': script } @@ -749,9 +749,9 @@ def modify_script_task( schedule_dict = schedule._generate_dict() extra = { - 'notify_enable': 'true' if notify_email is not '' else 'false', + 'notify_enable': notify_email != '', 'notify_mail': notify_email, - 'notify_if_error': 'true' if notify_only_on_error else 'false', + 'notify_if_error': notify_only_on_error, 'script': script }