Skip to content

Commit

Permalink
Remove unnecesary ternary
Browse files Browse the repository at this point in the history
  • Loading branch information
joeperpetua committed Sep 13, 2024
1 parent f40050c commit d1be2d6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions synology_api/task_scheduler.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down Expand Up @@ -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
}

Expand Down

0 comments on commit d1be2d6

Please sign in to comment.