We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Update view for unevaluated contributions 
This view lets us see people with unevaluated contributions. This should be updated to show people with unevaluated "Get Involved" step.

https://amy.carpentries.org/trainings/trainees/?search=&lesson_contribution=on&is_instructor=&training=&training_request=unknown&order_by=

Created automatically from an Asana task.

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `amy/trainings/filters.py`
Content:
```
1 import re
2 
3 from django.db.models import Q
4 from django.forms import widgets
5 import django_filters
6 
7 from workshops.fields import ModelSelect2Widget
8 from workshops.filters import AMYFilterSet, NamesOrderingFilter
9 from workshops.forms import SELECT2_SIDEBAR
10 from workshops.models import Event, Person
11 
12 
13 def filter_all_persons(queryset, name, all_persons):
14     """Filter only trainees when all_persons==False."""
15     if all_persons:
16         return queryset
17     else:
18         return queryset.filter(
19             task__role__name="learner", task__event__tags__name="TTT"
20         ).distinct()
21 
22 
23 def filter_trainees_by_trainee_name_or_email(queryset, name, value):
24     if value:
25         # 'Harry Potter' -> ['Harry', 'Potter']
26         tokens = re.split(r"\s+", value)
27         # Each token must match email address or github username or personal or
28         # family name.
29         for token in tokens:
30             queryset = queryset.filter(
31                 Q(personal__icontains=token)
32                 | Q(family__icontains=token)
33                 | Q(email__icontains=token)
34             )
35         return queryset
36     else:
37         return queryset
38 
39 
40 def filter_trainees_by_unevaluated_lesson_contribution_presence(queryset, name, flag):
41     if flag:  # return only trainees with an unevaluated lesson contribution
42         return queryset.filter(trainingprogress__state="n").distinct()
43     else:
44         return queryset
45 
46 
47 def filter_trainees_by_training_request_presence(queryset, name, flag):
48     if flag is None:
49         return queryset
50     elif flag is True:  # return only trainees who submitted training request
51         return queryset.filter(trainingrequest__isnull=False).distinct()
52     else:  # return only trainees who did not submit training request
53         return queryset.filter(trainingrequest__isnull=True)
54 
55 
56 def filter_trainees_by_instructor_status(queryset, name, choice):
57     if choice == "yes":
58         return queryset.filter(is_instructor=True)
59     elif choice == "eligible":
60         # Instructor eligible but without any badge.
61         # This code is kept in Q()-expressions to allow for fast condition
62         # change.
63         return queryset.filter(Q(instructor_eligible__gte=1) & Q(is_instructor=False))
64     elif choice == "no":
65         return queryset.filter(is_instructor=False)
66     else:
67         return queryset
68 
69 
70 def filter_trainees_by_training(queryset, name, training):
71     if training is None:
72         return queryset
73     else:
74         return queryset.filter(
75             task__role__name="learner", task__event=training
76         ).distinct()
77 
78 
79 class TraineeFilter(AMYFilterSet):
80     search = django_filters.CharFilter(
81         method=filter_trainees_by_trainee_name_or_email, label="Name or Email"
82     )
83 
84     all_persons = django_filters.BooleanFilter(
85         label="Include all people, not only trainees",
86         method=filter_all_persons,
87         widget=widgets.CheckboxInput,
88     )
89 
90     lesson_contribution = django_filters.BooleanFilter(
91         label="Only trainees with unevaluated Lesson Contribution",
92         widget=widgets.CheckboxInput,
93         method=filter_trainees_by_unevaluated_lesson_contribution_presence,
94     )
95 
96     training_request = django_filters.BooleanFilter(
97         label="Is training request present?",
98         method=filter_trainees_by_training_request_presence,
99     )
100 
101     is_instructor = django_filters.ChoiceFilter(
102         label="Is Instructor?",
103         method=filter_trainees_by_instructor_status,
104         choices=[
105             ("", "Unknown"),
106             ("yes", "Yes, has Instructor badge"),
107             ("eligible", "No, but eligible to be certified"),
108             ("no", "No instructor badge"),
109         ],
110     )
111 
112     training = django_filters.ModelChoiceFilter(
113         queryset=Event.objects.ttt(),
114         method=filter_trainees_by_training,
115         label="Training",
116         widget=ModelSelect2Widget(
117             data_view="ttt-event-lookup",
118             attrs=SELECT2_SIDEBAR,
119         ),
120     )
121 
122     order_by = NamesOrderingFilter(
123         fields=(
124             "last_login",
125             "email",
126         ),
127     )
128 
129     class Meta:
130         model = Person
131         fields = [
132             "search",
133             "all_persons",
134             "lesson_contribution",
135             "is_instructor",
136             "training",
137         ]
138
```

Path: `amy/workshops/templatetags/training_progress.py`
Content:
```
1 from django import template
2 from django.template.defaultfilters import escape
3 from django.utils.safestring import mark_safe
4 
5 from workshops.models import TrainingProgress
6 
7 register = template.Library()
8 
9 
10 @register.simple_tag
11 def progress_label(progress):
12     assert isinstance(progress, TrainingProgress)
13 
14     switch = {
15         "n": "warning",
16         "f": "danger",
17         "a": "info",
18         "p": "success",
19     }
20     additional_label = switch[progress.state]
21 
22     fmt = "badge badge-{}".format(additional_label)
23     return mark_safe(fmt)
24 
25 
26 @register.simple_tag
27 def progress_description(progress):
28     assert isinstance(progress, TrainingProgress)
29 
30     # build involvement details as needed
31     if progress.requirement.name == "Get Involved" and progress.involvement_type:
32         involvement = "<br />"
33         involvement += progress.involvement_type.name
34         if progress.involvement_type.name == "Other":
35             involvement += f": {progress.trainee_notes or 'No details provided'}"
36     else:
37         involvement = ""
38 
39     text = "{state} {type}{involvement}<br />on {day}.{notes}".format(
40         state=progress.get_state_display(),
41         type=progress.requirement,
42         involvement=involvement,
43         day=progress.created_at.strftime("%A %d %B %Y at %H:%M"),
44         notes="<br />Notes: {}".format(escape(progress.notes))
45         if progress.notes
46         else "",
47     )
48     text = text[0].upper() + text[1:]
49     return mark_safe(text)
50
```
--- 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/amy/trainings/filters.py b/amy/trainings/filters.py
--- a/amy/trainings/filters.py
+++ b/amy/trainings/filters.py
@@ -37,8 +37,8 @@
         return queryset
 
 
-def filter_trainees_by_unevaluated_lesson_contribution_presence(queryset, name, flag):
-    if flag:  # return only trainees with an unevaluated lesson contribution
+def filter_trainees_by_unevaluated_get_involved_presence(queryset, name, flag):
+    if flag:  # return only trainees with an unevaluated Get Involved submission
         return queryset.filter(trainingprogress__state="n").distinct()
     else:
         return queryset
@@ -87,10 +87,10 @@
         widget=widgets.CheckboxInput,
     )
 
-    lesson_contribution = django_filters.BooleanFilter(
-        label="Only trainees with unevaluated Lesson Contribution",
+    get_involved = django_filters.BooleanFilter(
+        label="Only trainees with unevaluated Get Involved submission",
         widget=widgets.CheckboxInput,
-        method=filter_trainees_by_unevaluated_lesson_contribution_presence,
+        method=filter_trainees_by_unevaluated_get_involved_presence,
     )
 
     training_request = django_filters.BooleanFilter(
@@ -131,7 +131,7 @@
         fields = [
             "search",
             "all_persons",
-            "lesson_contribution",
+            "get_involved",
             "is_instructor",
             "training",
         ]
diff --git a/amy/workshops/templatetags/training_progress.py b/amy/workshops/templatetags/training_progress.py
--- a/amy/workshops/templatetags/training_progress.py
+++ b/amy/workshops/templatetags/training_progress.py
@@ -36,11 +36,17 @@
     else:
         involvement = ""
 
+    day = (
+        progress.date.strftime("%A %d %B %Y")
+        if progress.date
+        else progress.created_at.strftime("%A %d %B %Y at %H:%M")
+    )
+
     text = "{state} {type}{involvement}<br />on {day}.{notes}".format(
         state=progress.get_state_display(),
         type=progress.requirement,
         involvement=involvement,
-        day=progress.created_at.strftime("%A %d %B %Y at %H:%M"),
+        day=day,
         notes="<br />Notes: {}".format(escape(progress.notes))
         if progress.notes
         else "",

{"golden_diff": "diff --git a/amy/trainings/filters.py b/amy/trainings/filters.py\n--- a/amy/trainings/filters.py\n+++ b/amy/trainings/filters.py\n@@ -37,8 +37,8 @@\n         return queryset\n \n \n-def filter_trainees_by_unevaluated_lesson_contribution_presence(queryset, name, flag):\n-    if flag:  # return only trainees with an unevaluated lesson contribution\n+def filter_trainees_by_unevaluated_get_involved_presence(queryset, name, flag):\n+    if flag:  # return only trainees with an unevaluated Get Involved submission\n         return queryset.filter(trainingprogress__state=\"n\").distinct()\n     else:\n         return queryset\n@@ -87,10 +87,10 @@\n         widget=widgets.CheckboxInput,\n     )\n \n-    lesson_contribution = django_filters.BooleanFilter(\n-        label=\"Only trainees with unevaluated Lesson Contribution\",\n+    get_involved = django_filters.BooleanFilter(\n+        label=\"Only trainees with unevaluated Get Involved submission\",\n         widget=widgets.CheckboxInput,\n-        method=filter_trainees_by_unevaluated_lesson_contribution_presence,\n+        method=filter_trainees_by_unevaluated_get_involved_presence,\n     )\n \n     training_request = django_filters.BooleanFilter(\n@@ -131,7 +131,7 @@\n         fields = [\n             \"search\",\n             \"all_persons\",\n-            \"lesson_contribution\",\n+            \"get_involved\",\n             \"is_instructor\",\n             \"training\",\n         ]\ndiff --git a/amy/workshops/templatetags/training_progress.py b/amy/workshops/templatetags/training_progress.py\n--- a/amy/workshops/templatetags/training_progress.py\n+++ b/amy/workshops/templatetags/training_progress.py\n@@ -36,11 +36,17 @@\n     else:\n         involvement = \"\"\n \n+    day = (\n+        progress.date.strftime(\"%A %d %B %Y\")\n+        if progress.date\n+        else progress.created_at.strftime(\"%A %d %B %Y at %H:%M\")\n+    )\n+\n     text = \"{state} {type}{involvement}<br />on {day}.{notes}\".format(\n         state=progress.get_state_display(),\n         type=progress.requirement,\n         involvement=involvement,\n-        day=progress.created_at.strftime(\"%A %d %B %Y at %H:%M\"),\n+        day=day,\n         notes=\"<br />Notes: {}\".format(escape(progress.notes))\n         if progress.notes\n         else \"\",\n", "issue": "Update view for unevaluated contributions \nThis view lets us see people with unevaluated contributions. This should be updated to show people with unevaluated \"Get Involved\" step.\n\nhttps://amy.carpentries.org/trainings/trainees/?search=&lesson_contribution=on&is_instructor=&training=&training_request=unknown&order_by=\n\nCreated automatically from an Asana task.\n", "before_files": [{"content": "import re\n\nfrom django.db.models import Q\nfrom django.forms import widgets\nimport django_filters\n\nfrom workshops.fields import ModelSelect2Widget\nfrom workshops.filters import AMYFilterSet, NamesOrderingFilter\nfrom workshops.forms import SELECT2_SIDEBAR\nfrom workshops.models import Event, Person\n\n\ndef filter_all_persons(queryset, name, all_persons):\n    \"\"\"Filter only trainees when all_persons==False.\"\"\"\n    if all_persons:\n        return queryset\n    else:\n        return queryset.filter(\n            task__role__name=\"learner\", task__event__tags__name=\"TTT\"\n        ).distinct()\n\n\ndef filter_trainees_by_trainee_name_or_email(queryset, name, value):\n    if value:\n        # 'Harry Potter' -> ['Harry', 'Potter']\n        tokens = re.split(r\"\\s+\", value)\n        # Each token must match email address or github username or personal or\n        # family name.\n        for token in tokens:\n            queryset = queryset.filter(\n                Q(personal__icontains=token)\n                | Q(family__icontains=token)\n                | Q(email__icontains=token)\n            )\n        return queryset\n    else:\n        return queryset\n\n\ndef filter_trainees_by_unevaluated_lesson_contribution_presence(queryset, name, flag):\n    if flag:  # return only trainees with an unevaluated lesson contribution\n        return queryset.filter(trainingprogress__state=\"n\").distinct()\n    else:\n        return queryset\n\n\ndef filter_trainees_by_training_request_presence(queryset, name, flag):\n    if flag is None:\n        return queryset\n    elif flag is True:  # return only trainees who submitted training request\n        return queryset.filter(trainingrequest__isnull=False).distinct()\n    else:  # return only trainees who did not submit training request\n        return queryset.filter(trainingrequest__isnull=True)\n\n\ndef filter_trainees_by_instructor_status(queryset, name, choice):\n    if choice == \"yes\":\n        return queryset.filter(is_instructor=True)\n    elif choice == \"eligible\":\n        # Instructor eligible but without any badge.\n        # This code is kept in Q()-expressions to allow for fast condition\n        # change.\n        return queryset.filter(Q(instructor_eligible__gte=1) & Q(is_instructor=False))\n    elif choice == \"no\":\n        return queryset.filter(is_instructor=False)\n    else:\n        return queryset\n\n\ndef filter_trainees_by_training(queryset, name, training):\n    if training is None:\n        return queryset\n    else:\n        return queryset.filter(\n            task__role__name=\"learner\", task__event=training\n        ).distinct()\n\n\nclass TraineeFilter(AMYFilterSet):\n    search = django_filters.CharFilter(\n        method=filter_trainees_by_trainee_name_or_email, label=\"Name or Email\"\n    )\n\n    all_persons = django_filters.BooleanFilter(\n        label=\"Include all people, not only trainees\",\n        method=filter_all_persons,\n        widget=widgets.CheckboxInput,\n    )\n\n    lesson_contribution = django_filters.BooleanFilter(\n        label=\"Only trainees with unevaluated Lesson Contribution\",\n        widget=widgets.CheckboxInput,\n        method=filter_trainees_by_unevaluated_lesson_contribution_presence,\n    )\n\n    training_request = django_filters.BooleanFilter(\n        label=\"Is training request present?\",\n        method=filter_trainees_by_training_request_presence,\n    )\n\n    is_instructor = django_filters.ChoiceFilter(\n        label=\"Is Instructor?\",\n        method=filter_trainees_by_instructor_status,\n        choices=[\n            (\"\", \"Unknown\"),\n            (\"yes\", \"Yes, has Instructor badge\"),\n            (\"eligible\", \"No, but eligible to be certified\"),\n            (\"no\", \"No instructor badge\"),\n        ],\n    )\n\n    training = django_filters.ModelChoiceFilter(\n        queryset=Event.objects.ttt(),\n        method=filter_trainees_by_training,\n        label=\"Training\",\n        widget=ModelSelect2Widget(\n            data_view=\"ttt-event-lookup\",\n            attrs=SELECT2_SIDEBAR,\n        ),\n    )\n\n    order_by = NamesOrderingFilter(\n        fields=(\n            \"last_login\",\n            \"email\",\n        ),\n    )\n\n    class Meta:\n        model = Person\n        fields = [\n            \"search\",\n            \"all_persons\",\n            \"lesson_contribution\",\n            \"is_instructor\",\n            \"training\",\n        ]\n", "path": "amy/trainings/filters.py"}, {"content": "from django import template\nfrom django.template.defaultfilters import escape\nfrom django.utils.safestring import mark_safe\n\nfrom workshops.models import TrainingProgress\n\nregister = template.Library()\n\n\n@register.simple_tag\ndef progress_label(progress):\n    assert isinstance(progress, TrainingProgress)\n\n    switch = {\n        \"n\": \"warning\",\n        \"f\": \"danger\",\n        \"a\": \"info\",\n        \"p\": \"success\",\n    }\n    additional_label = switch[progress.state]\n\n    fmt = \"badge badge-{}\".format(additional_label)\n    return mark_safe(fmt)\n\n\n@register.simple_tag\ndef progress_description(progress):\n    assert isinstance(progress, TrainingProgress)\n\n    # build involvement details as needed\n    if progress.requirement.name == \"Get Involved\" and progress.involvement_type:\n        involvement = \"<br />\"\n        involvement += progress.involvement_type.name\n        if progress.involvement_type.name == \"Other\":\n            involvement += f\": {progress.trainee_notes or 'No details provided'}\"\n    else:\n        involvement = \"\"\n\n    text = \"{state} {type}{involvement}<br />on {day}.{notes}\".format(\n        state=progress.get_state_display(),\n        type=progress.requirement,\n        involvement=involvement,\n        day=progress.created_at.strftime(\"%A %d %B %Y at %H:%M\"),\n        notes=\"<br />Notes: {}\".format(escape(progress.notes))\n        if progress.notes\n        else \"\",\n    )\n    text = text[0].upper() + text[1:]\n    return mark_safe(text)\n", "path": "amy/workshops/templatetags/training_progress.py"}], "after_files": [{"content": "import re\n\nfrom django.db.models import Q\nfrom django.forms import widgets\nimport django_filters\n\nfrom workshops.fields import ModelSelect2Widget\nfrom workshops.filters import AMYFilterSet, NamesOrderingFilter\nfrom workshops.forms import SELECT2_SIDEBAR\nfrom workshops.models import Event, Person\n\n\ndef filter_all_persons(queryset, name, all_persons):\n    \"\"\"Filter only trainees when all_persons==False.\"\"\"\n    if all_persons:\n        return queryset\n    else:\n        return queryset.filter(\n            task__role__name=\"learner\", task__event__tags__name=\"TTT\"\n        ).distinct()\n\n\ndef filter_trainees_by_trainee_name_or_email(queryset, name, value):\n    if value:\n        # 'Harry Potter' -> ['Harry', 'Potter']\n        tokens = re.split(r\"\\s+\", value)\n        # Each token must match email address or github username or personal or\n        # family name.\n        for token in tokens:\n            queryset = queryset.filter(\n                Q(personal__icontains=token)\n                | Q(family__icontains=token)\n                | Q(email__icontains=token)\n            )\n        return queryset\n    else:\n        return queryset\n\n\ndef filter_trainees_by_unevaluated_get_involved_presence(queryset, name, flag):\n    if flag:  # return only trainees with an unevaluated Get Involved submission\n        return queryset.filter(trainingprogress__state=\"n\").distinct()\n    else:\n        return queryset\n\n\ndef filter_trainees_by_training_request_presence(queryset, name, flag):\n    if flag is None:\n        return queryset\n    elif flag is True:  # return only trainees who submitted training request\n        return queryset.filter(trainingrequest__isnull=False).distinct()\n    else:  # return only trainees who did not submit training request\n        return queryset.filter(trainingrequest__isnull=True)\n\n\ndef filter_trainees_by_instructor_status(queryset, name, choice):\n    if choice == \"yes\":\n        return queryset.filter(is_instructor=True)\n    elif choice == \"eligible\":\n        # Instructor eligible but without any badge.\n        # This code is kept in Q()-expressions to allow for fast condition\n        # change.\n        return queryset.filter(Q(instructor_eligible__gte=1) & Q(is_instructor=False))\n    elif choice == \"no\":\n        return queryset.filter(is_instructor=False)\n    else:\n        return queryset\n\n\ndef filter_trainees_by_training(queryset, name, training):\n    if training is None:\n        return queryset\n    else:\n        return queryset.filter(\n            task__role__name=\"learner\", task__event=training\n        ).distinct()\n\n\nclass TraineeFilter(AMYFilterSet):\n    search = django_filters.CharFilter(\n        method=filter_trainees_by_trainee_name_or_email, label=\"Name or Email\"\n    )\n\n    all_persons = django_filters.BooleanFilter(\n        label=\"Include all people, not only trainees\",\n        method=filter_all_persons,\n        widget=widgets.CheckboxInput,\n    )\n\n    get_involved = django_filters.BooleanFilter(\n        label=\"Only trainees with unevaluated Get Involved submission\",\n        widget=widgets.CheckboxInput,\n        method=filter_trainees_by_unevaluated_get_involved_presence,\n    )\n\n    training_request = django_filters.BooleanFilter(\n        label=\"Is training request present?\",\n        method=filter_trainees_by_training_request_presence,\n    )\n\n    is_instructor = django_filters.ChoiceFilter(\n        label=\"Is Instructor?\",\n        method=filter_trainees_by_instructor_status,\n        choices=[\n            (\"\", \"Unknown\"),\n            (\"yes\", \"Yes, has Instructor badge\"),\n            (\"eligible\", \"No, but eligible to be certified\"),\n            (\"no\", \"No instructor badge\"),\n        ],\n    )\n\n    training = django_filters.ModelChoiceFilter(\n        queryset=Event.objects.ttt(),\n        method=filter_trainees_by_training,\n        label=\"Training\",\n        widget=ModelSelect2Widget(\n            data_view=\"ttt-event-lookup\",\n            attrs=SELECT2_SIDEBAR,\n        ),\n    )\n\n    order_by = NamesOrderingFilter(\n        fields=(\n            \"last_login\",\n            \"email\",\n        ),\n    )\n\n    class Meta:\n        model = Person\n        fields = [\n            \"search\",\n            \"all_persons\",\n            \"get_involved\",\n            \"is_instructor\",\n            \"training\",\n        ]\n", "path": "amy/trainings/filters.py"}, {"content": "from django import template\nfrom django.template.defaultfilters import escape\nfrom django.utils.safestring import mark_safe\n\nfrom workshops.models import TrainingProgress\n\nregister = template.Library()\n\n\n@register.simple_tag\ndef progress_label(progress):\n    assert isinstance(progress, TrainingProgress)\n\n    switch = {\n        \"n\": \"warning\",\n        \"f\": \"danger\",\n        \"a\": \"info\",\n        \"p\": \"success\",\n    }\n    additional_label = switch[progress.state]\n\n    fmt = \"badge badge-{}\".format(additional_label)\n    return mark_safe(fmt)\n\n\n@register.simple_tag\ndef progress_description(progress):\n    assert isinstance(progress, TrainingProgress)\n\n    # build involvement details as needed\n    if progress.requirement.name == \"Get Involved\" and progress.involvement_type:\n        involvement = \"<br />\"\n        involvement += progress.involvement_type.name\n        if progress.involvement_type.name == \"Other\":\n            involvement += f\": {progress.trainee_notes or 'No details provided'}\"\n    else:\n        involvement = \"\"\n\n    day = (\n        progress.date.strftime(\"%A %d %B %Y\")\n        if progress.date\n        else progress.created_at.strftime(\"%A %d %B %Y at %H:%M\")\n    )\n\n    text = \"{state} {type}{involvement}<br />on {day}.{notes}\".format(\n        state=progress.get_state_display(),\n        type=progress.requirement,\n        involvement=involvement,\n        day=day,\n        notes=\"<br />Notes: {}\".format(escape(progress.notes))\n        if progress.notes\n        else \"\",\n    )\n    text = text[0].upper() + text[1:]\n    return mark_safe(text)\n", "path": "amy/workshops/templatetags/training_progress.py"}]}