We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Fix filter calls
Similar with the calls to `map`, these calls must be fixed as well.

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `tcms/testplans/helpers/email.py`
Content:
```
1 # -*- coding: utf-8 -*-
2 from django.conf import settings
3 
4 from tcms.core.utils.mailto import send_email_using_threading
5 
6 
7 def email_plan_update(plan):
8     recipients = get_plan_notification_recipients(plan)
9     if len(recipients) == 0:
10         return
11     subject = u'TestPlan %s has been updated.' % plan.pk
12     send_email_using_threading(settings.PLAN_EMAIL_TEMPLATE, subject,
13                                recipients, {'plan': plan})
14 
15 
16 def email_plan_deletion(plan):
17     recipients = get_plan_notification_recipients(plan)
18     if len(recipients) == 0:
19         return
20     subject = u'TestPlan %s has been deleted.' % plan.pk
21     send_email_using_threading(settings.PLAN_DELELE_EMAIL_TEMPLATE, subject,
22                                recipients, {'plan': plan})
23 
24 
25 def get_plan_notification_recipients(plan):
26     recipients = set()
27     if plan.owner:
28         if plan.email_settings.auto_to_plan_owner:
29             recipients.add(plan.owner.email)
30     if plan.email_settings.auto_to_plan_author:
31         recipients.add(plan.author.email)
32     if plan.email_settings.auto_to_case_owner:
33         case_authors = plan.case.values_list('author__email', flat=True)
34         recipients.update(case_authors)
35     if plan.email_settings.auto_to_case_default_tester:
36         case_testers = plan.case.values_list('default_tester__email',
37                                              flat=True)
38         recipients.update(case_testers)
39     return filter(lambda e: bool(e), recipients)
40
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/tcms/testplans/helpers/email.py b/tcms/testplans/helpers/email.py
--- a/tcms/testplans/helpers/email.py
+++ b/tcms/testplans/helpers/email.py
@@ -36,4 +36,4 @@
         case_testers = plan.case.values_list('default_tester__email',
                                              flat=True)
         recipients.update(case_testers)
-    return filter(lambda e: bool(e), recipients)
+    return [r for r in recipients if r]

{"golden_diff": "diff --git a/tcms/testplans/helpers/email.py b/tcms/testplans/helpers/email.py\n--- a/tcms/testplans/helpers/email.py\n+++ b/tcms/testplans/helpers/email.py\n@@ -36,4 +36,4 @@\n         case_testers = plan.case.values_list('default_tester__email',\n                                              flat=True)\n         recipients.update(case_testers)\n-    return filter(lambda e: bool(e), recipients)\n+    return [r for r in recipients if r]\n", "issue": "Fix filter calls\nSimilar with the calls to `map`, these calls must be fixed as well.\n", "before_files": [{"content": "# -*- coding: utf-8 -*-\nfrom django.conf import settings\n\nfrom tcms.core.utils.mailto import send_email_using_threading\n\n\ndef email_plan_update(plan):\n    recipients = get_plan_notification_recipients(plan)\n    if len(recipients) == 0:\n        return\n    subject = u'TestPlan %s has been updated.' % plan.pk\n    send_email_using_threading(settings.PLAN_EMAIL_TEMPLATE, subject,\n                               recipients, {'plan': plan})\n\n\ndef email_plan_deletion(plan):\n    recipients = get_plan_notification_recipients(plan)\n    if len(recipients) == 0:\n        return\n    subject = u'TestPlan %s has been deleted.' % plan.pk\n    send_email_using_threading(settings.PLAN_DELELE_EMAIL_TEMPLATE, subject,\n                               recipients, {'plan': plan})\n\n\ndef get_plan_notification_recipients(plan):\n    recipients = set()\n    if plan.owner:\n        if plan.email_settings.auto_to_plan_owner:\n            recipients.add(plan.owner.email)\n    if plan.email_settings.auto_to_plan_author:\n        recipients.add(plan.author.email)\n    if plan.email_settings.auto_to_case_owner:\n        case_authors = plan.case.values_list('author__email', flat=True)\n        recipients.update(case_authors)\n    if plan.email_settings.auto_to_case_default_tester:\n        case_testers = plan.case.values_list('default_tester__email',\n                                             flat=True)\n        recipients.update(case_testers)\n    return filter(lambda e: bool(e), recipients)\n", "path": "tcms/testplans/helpers/email.py"}], "after_files": [{"content": "# -*- coding: utf-8 -*-\nfrom django.conf import settings\n\nfrom tcms.core.utils.mailto import send_email_using_threading\n\n\ndef email_plan_update(plan):\n    recipients = get_plan_notification_recipients(plan)\n    if len(recipients) == 0:\n        return\n    subject = u'TestPlan %s has been updated.' % plan.pk\n    send_email_using_threading(settings.PLAN_EMAIL_TEMPLATE, subject,\n                               recipients, {'plan': plan})\n\n\ndef email_plan_deletion(plan):\n    recipients = get_plan_notification_recipients(plan)\n    if len(recipients) == 0:\n        return\n    subject = u'TestPlan %s has been deleted.' % plan.pk\n    send_email_using_threading(settings.PLAN_DELELE_EMAIL_TEMPLATE, subject,\n                               recipients, {'plan': plan})\n\n\ndef get_plan_notification_recipients(plan):\n    recipients = set()\n    if plan.owner:\n        if plan.email_settings.auto_to_plan_owner:\n            recipients.add(plan.owner.email)\n    if plan.email_settings.auto_to_plan_author:\n        recipients.add(plan.author.email)\n    if plan.email_settings.auto_to_case_owner:\n        case_authors = plan.case.values_list('author__email', flat=True)\n        recipients.update(case_authors)\n    if plan.email_settings.auto_to_case_default_tester:\n        case_testers = plan.case.values_list('default_tester__email',\n                                             flat=True)\n        recipients.update(case_testers)\n    return [r for r in recipients if r]\n", "path": "tcms/testplans/helpers/email.py"}]}