We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Missing frontpage articles in API v2
### Describe the bug
When there are multiple frontpage articles that should be visible (such as currently on staging), `api/v2/announcements/frontpage-articles/` shows only one.


--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `website/announcements/models.py`
Content:
```
1 """The models defined by the announcement package."""
2 from django.core.validators import (
3     FileExtensionValidator,
4     get_available_image_extensions,
5 )
6 from django.db import models
7 from django.db.models import CharField, Manager, Q
8 from django.utils import timezone
9 from django.utils.translation import gettext_lazy as _
10 from tinymce.models import HTMLField
11 
12 
13 class VisibleObjectManager(Manager):
14     """Get all active members, i.e. who have a committee membership."""
15 
16     def get_queryset(self):
17         """Select all visible items."""
18         return (
19             super()
20             .get_queryset()
21             .filter(
22                 (Q(until__isnull=True) | Q(until__gt=timezone.now()))
23                 & (Q(since__isnull=True) | Q(since__lte=timezone.now()))
24                 & ~(Q(since__isnull=True) & Q(until__isnull=True))
25             )
26         )
27 
28 
29 class Announcement(models.Model):
30     """Describes an announcement."""
31 
32     objects = models.Manager()
33     visible_objects = VisibleObjectManager()
34 
35     content = HTMLField(
36         verbose_name=_("Content"),
37         help_text=_("The content of the announcement; what text to display."),
38         blank=False,
39         max_length=500,
40     )
41 
42     since = models.DateTimeField(
43         verbose_name=_("Display since"),
44         help_text=_("Hide this announcement before this time."),
45         default=timezone.now,
46     )
47 
48     until = models.DateTimeField(
49         verbose_name=_("Display until"),
50         help_text=_("Hide this announcement after this time."),
51         blank=True,
52         null=True,
53     )
54 
55     icon = models.CharField(
56         verbose_name=_("Font Awesome icon"),
57         help_text=_("Font Awesome abbreviation for icon to use."),
58         max_length=150,
59         default="bullhorn",
60     )
61 
62     closeable = models.BooleanField(default=True)
63 
64     class Meta:
65         ordering = ("-since",)
66 
67     def __str__(self):
68         return str(self.content)
69 
70     @property
71     def is_visible(self):
72         """Is this announcement currently visible."""
73         return (
74             (self.until is None or self.until > timezone.now())
75             and (self.since is None or self.since <= timezone.now())
76             and not (self.since is None and self.until is None)
77         )
78 
79 
80 class FrontpageArticle(models.Model):
81     """Front page articles."""
82 
83     objects = models.Manager()
84     visible_objects = VisibleObjectManager()
85 
86     title = models.CharField(
87         verbose_name=_("Title"),
88         help_text=_("The title of the article; what goes in the header"),
89         blank=False,
90         max_length=80,
91     )
92 
93     content = HTMLField(
94         verbose_name=_("Content"),
95         help_text=_("The content of the article; what text to display."),
96         blank=False,
97         max_length=5000,
98     )
99 
100     since = models.DateTimeField(
101         verbose_name=_("Display since"),
102         help_text=_("Hide this article before this time."),
103         default=timezone.now,
104     )
105 
106     until = models.DateTimeField(
107         verbose_name=_("Display until"),
108         help_text=_("Hide this article after this time."),
109         blank=True,
110         null=True,
111     )
112 
113     class Meta:
114         ordering = ("-since",)
115 
116     def __str__(self):
117         return str(self.title)
118 
119     @property
120     def is_visible(self):
121         """Is this announcement currently visible."""
122         return (
123             (self.until is None or self.until > timezone.now())
124             and (self.since is None or self.since <= timezone.now())
125             and not (self.since is None and self.until is None)
126         )
127 
128 
129 def validate_image(value):
130     return FileExtensionValidator(
131         allowed_extensions=[*get_available_image_extensions(), "svg"]
132     )(value)
133 
134 
135 class Slide(models.Model):
136     """Describes an announcement."""
137 
138     objects = models.Manager()
139     visible_objects = VisibleObjectManager()
140 
141     title = CharField(
142         verbose_name=_("Title"),
143         help_text=_("The title of the slide; just for the admin."),
144         blank=False,
145         max_length=100,
146     )
147 
148     content = models.FileField(
149         verbose_name=_("Content"),
150         help_text=_("The content of the slide; what image to display."),
151         blank=False,
152         upload_to="public/announcements/slides/",
153         validators=[validate_image],
154     )
155 
156     since = models.DateTimeField(
157         verbose_name=_("Display since"),
158         help_text=_(
159             "Hide this slide before this time. When all date- and "
160             "time-fields are left blank, the slide won't "
161             "be visible. It will, however, be visible on an event-page "
162             "if it's linked to an event."
163         ),
164         default=timezone.now,
165         blank=True,
166         null=True,
167     )
168 
169     until = models.DateTimeField(
170         verbose_name=_("Display until"),
171         help_text=_("Hide this slide after this time."),
172         blank=True,
173         null=True,
174     )
175 
176     order = models.PositiveIntegerField(
177         verbose_name=_("Order"),
178         help_text=_("Approximately where this slide should appear in the order"),
179         default=0,
180     )
181 
182     members_only = models.BooleanField(
183         verbose_name=_("Display only for authenticated members"), default=False
184     )
185 
186     url = models.URLField(
187         verbose_name=_("Link"),
188         help_text=_("Place the user is taken to when clicking the slide"),
189         blank=True,
190         null=True,
191     )
192 
193     url_blank = models.BooleanField(
194         verbose_name=_("Link outside thalia.nu"),
195         help_text=_("Clicking the slide will open a new tab"),
196         default=False,
197     )
198 
199     class Meta:
200         ordering = ("-since",)
201 
202     @property
203     def is_visible(self):
204         """Is this slide currently visible."""
205         return (
206             (self.until is None or self.until > timezone.now())
207             and (self.since is None or self.since <= timezone.now())
208             and not (self.since is None and self.until is None)
209         )
210 
211     def __str__(self):
212         return str(self.title)
213
```
--- 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/website/announcements/models.py b/website/announcements/models.py
--- a/website/announcements/models.py
+++ b/website/announcements/models.py
@@ -5,6 +5,7 @@
 )
 from django.db import models
 from django.db.models import CharField, Manager, Q
+from django.db.models.functions import Now
 from django.utils import timezone
 from django.utils.translation import gettext_lazy as _
 from tinymce.models import HTMLField
@@ -19,8 +20,8 @@
             super()
             .get_queryset()
             .filter(
-                (Q(until__isnull=True) | Q(until__gt=timezone.now()))
-                & (Q(since__isnull=True) | Q(since__lte=timezone.now()))
+                (Q(until__isnull=True) | Q(until__gt=Now()))
+                & (Q(since__isnull=True) | Q(since__lte=Now()))
                 & ~(Q(since__isnull=True) & Q(until__isnull=True))
             )
         )

{"golden_diff": "diff --git a/website/announcements/models.py b/website/announcements/models.py\n--- a/website/announcements/models.py\n+++ b/website/announcements/models.py\n@@ -5,6 +5,7 @@\n )\n from django.db import models\n from django.db.models import CharField, Manager, Q\n+from django.db.models.functions import Now\n from django.utils import timezone\n from django.utils.translation import gettext_lazy as _\n from tinymce.models import HTMLField\n@@ -19,8 +20,8 @@\n             super()\n             .get_queryset()\n             .filter(\n-                (Q(until__isnull=True) | Q(until__gt=timezone.now()))\n-                & (Q(since__isnull=True) | Q(since__lte=timezone.now()))\n+                (Q(until__isnull=True) | Q(until__gt=Now()))\n+                & (Q(since__isnull=True) | Q(since__lte=Now()))\n                 & ~(Q(since__isnull=True) & Q(until__isnull=True))\n             )\n         )\n", "issue": "Missing frontpage articles in API v2\n### Describe the bug\r\nWhen there are multiple frontpage articles that should be visible (such as currently on staging), `api/v2/announcements/frontpage-articles/` shows only one.\r\n\n", "before_files": [{"content": "\"\"\"The models defined by the announcement package.\"\"\"\nfrom django.core.validators import (\n    FileExtensionValidator,\n    get_available_image_extensions,\n)\nfrom django.db import models\nfrom django.db.models import CharField, Manager, Q\nfrom django.utils import timezone\nfrom django.utils.translation import gettext_lazy as _\nfrom tinymce.models import HTMLField\n\n\nclass VisibleObjectManager(Manager):\n    \"\"\"Get all active members, i.e. who have a committee membership.\"\"\"\n\n    def get_queryset(self):\n        \"\"\"Select all visible items.\"\"\"\n        return (\n            super()\n            .get_queryset()\n            .filter(\n                (Q(until__isnull=True) | Q(until__gt=timezone.now()))\n                & (Q(since__isnull=True) | Q(since__lte=timezone.now()))\n                & ~(Q(since__isnull=True) & Q(until__isnull=True))\n            )\n        )\n\n\nclass Announcement(models.Model):\n    \"\"\"Describes an announcement.\"\"\"\n\n    objects = models.Manager()\n    visible_objects = VisibleObjectManager()\n\n    content = HTMLField(\n        verbose_name=_(\"Content\"),\n        help_text=_(\"The content of the announcement; what text to display.\"),\n        blank=False,\n        max_length=500,\n    )\n\n    since = models.DateTimeField(\n        verbose_name=_(\"Display since\"),\n        help_text=_(\"Hide this announcement before this time.\"),\n        default=timezone.now,\n    )\n\n    until = models.DateTimeField(\n        verbose_name=_(\"Display until\"),\n        help_text=_(\"Hide this announcement after this time.\"),\n        blank=True,\n        null=True,\n    )\n\n    icon = models.CharField(\n        verbose_name=_(\"Font Awesome icon\"),\n        help_text=_(\"Font Awesome abbreviation for icon to use.\"),\n        max_length=150,\n        default=\"bullhorn\",\n    )\n\n    closeable = models.BooleanField(default=True)\n\n    class Meta:\n        ordering = (\"-since\",)\n\n    def __str__(self):\n        return str(self.content)\n\n    @property\n    def is_visible(self):\n        \"\"\"Is this announcement currently visible.\"\"\"\n        return (\n            (self.until is None or self.until > timezone.now())\n            and (self.since is None or self.since <= timezone.now())\n            and not (self.since is None and self.until is None)\n        )\n\n\nclass FrontpageArticle(models.Model):\n    \"\"\"Front page articles.\"\"\"\n\n    objects = models.Manager()\n    visible_objects = VisibleObjectManager()\n\n    title = models.CharField(\n        verbose_name=_(\"Title\"),\n        help_text=_(\"The title of the article; what goes in the header\"),\n        blank=False,\n        max_length=80,\n    )\n\n    content = HTMLField(\n        verbose_name=_(\"Content\"),\n        help_text=_(\"The content of the article; what text to display.\"),\n        blank=False,\n        max_length=5000,\n    )\n\n    since = models.DateTimeField(\n        verbose_name=_(\"Display since\"),\n        help_text=_(\"Hide this article before this time.\"),\n        default=timezone.now,\n    )\n\n    until = models.DateTimeField(\n        verbose_name=_(\"Display until\"),\n        help_text=_(\"Hide this article after this time.\"),\n        blank=True,\n        null=True,\n    )\n\n    class Meta:\n        ordering = (\"-since\",)\n\n    def __str__(self):\n        return str(self.title)\n\n    @property\n    def is_visible(self):\n        \"\"\"Is this announcement currently visible.\"\"\"\n        return (\n            (self.until is None or self.until > timezone.now())\n            and (self.since is None or self.since <= timezone.now())\n            and not (self.since is None and self.until is None)\n        )\n\n\ndef validate_image(value):\n    return FileExtensionValidator(\n        allowed_extensions=[*get_available_image_extensions(), \"svg\"]\n    )(value)\n\n\nclass Slide(models.Model):\n    \"\"\"Describes an announcement.\"\"\"\n\n    objects = models.Manager()\n    visible_objects = VisibleObjectManager()\n\n    title = CharField(\n        verbose_name=_(\"Title\"),\n        help_text=_(\"The title of the slide; just for the admin.\"),\n        blank=False,\n        max_length=100,\n    )\n\n    content = models.FileField(\n        verbose_name=_(\"Content\"),\n        help_text=_(\"The content of the slide; what image to display.\"),\n        blank=False,\n        upload_to=\"public/announcements/slides/\",\n        validators=[validate_image],\n    )\n\n    since = models.DateTimeField(\n        verbose_name=_(\"Display since\"),\n        help_text=_(\n            \"Hide this slide before this time. When all date- and \"\n            \"time-fields are left blank, the slide won't \"\n            \"be visible. It will, however, be visible on an event-page \"\n            \"if it's linked to an event.\"\n        ),\n        default=timezone.now,\n        blank=True,\n        null=True,\n    )\n\n    until = models.DateTimeField(\n        verbose_name=_(\"Display until\"),\n        help_text=_(\"Hide this slide after this time.\"),\n        blank=True,\n        null=True,\n    )\n\n    order = models.PositiveIntegerField(\n        verbose_name=_(\"Order\"),\n        help_text=_(\"Approximately where this slide should appear in the order\"),\n        default=0,\n    )\n\n    members_only = models.BooleanField(\n        verbose_name=_(\"Display only for authenticated members\"), default=False\n    )\n\n    url = models.URLField(\n        verbose_name=_(\"Link\"),\n        help_text=_(\"Place the user is taken to when clicking the slide\"),\n        blank=True,\n        null=True,\n    )\n\n    url_blank = models.BooleanField(\n        verbose_name=_(\"Link outside thalia.nu\"),\n        help_text=_(\"Clicking the slide will open a new tab\"),\n        default=False,\n    )\n\n    class Meta:\n        ordering = (\"-since\",)\n\n    @property\n    def is_visible(self):\n        \"\"\"Is this slide currently visible.\"\"\"\n        return (\n            (self.until is None or self.until > timezone.now())\n            and (self.since is None or self.since <= timezone.now())\n            and not (self.since is None and self.until is None)\n        )\n\n    def __str__(self):\n        return str(self.title)\n", "path": "website/announcements/models.py"}], "after_files": [{"content": "\"\"\"The models defined by the announcement package.\"\"\"\nfrom django.core.validators import (\n    FileExtensionValidator,\n    get_available_image_extensions,\n)\nfrom django.db import models\nfrom django.db.models import CharField, Manager, Q\nfrom django.db.models.functions import Now\nfrom django.utils import timezone\nfrom django.utils.translation import gettext_lazy as _\nfrom tinymce.models import HTMLField\n\n\nclass VisibleObjectManager(Manager):\n    \"\"\"Get all active members, i.e. who have a committee membership.\"\"\"\n\n    def get_queryset(self):\n        \"\"\"Select all visible items.\"\"\"\n        return (\n            super()\n            .get_queryset()\n            .filter(\n                (Q(until__isnull=True) | Q(until__gt=Now()))\n                & (Q(since__isnull=True) | Q(since__lte=Now()))\n                & ~(Q(since__isnull=True) & Q(until__isnull=True))\n            )\n        )\n\n\nclass Announcement(models.Model):\n    \"\"\"Describes an announcement.\"\"\"\n\n    objects = models.Manager()\n    visible_objects = VisibleObjectManager()\n\n    content = HTMLField(\n        verbose_name=_(\"Content\"),\n        help_text=_(\"The content of the announcement; what text to display.\"),\n        blank=False,\n        max_length=500,\n    )\n\n    since = models.DateTimeField(\n        verbose_name=_(\"Display since\"),\n        help_text=_(\"Hide this announcement before this time.\"),\n        default=timezone.now,\n    )\n\n    until = models.DateTimeField(\n        verbose_name=_(\"Display until\"),\n        help_text=_(\"Hide this announcement after this time.\"),\n        blank=True,\n        null=True,\n    )\n\n    icon = models.CharField(\n        verbose_name=_(\"Font Awesome icon\"),\n        help_text=_(\"Font Awesome abbreviation for icon to use.\"),\n        max_length=150,\n        default=\"bullhorn\",\n    )\n\n    closeable = models.BooleanField(default=True)\n\n    class Meta:\n        ordering = (\"-since\",)\n\n    def __str__(self):\n        return str(self.content)\n\n    @property\n    def is_visible(self):\n        \"\"\"Is this announcement currently visible.\"\"\"\n        return (\n            (self.until is None or self.until > timezone.now())\n            and (self.since is None or self.since <= timezone.now())\n            and not (self.since is None and self.until is None)\n        )\n\n\nclass FrontpageArticle(models.Model):\n    \"\"\"Front page articles.\"\"\"\n\n    objects = models.Manager()\n    visible_objects = VisibleObjectManager()\n\n    title = models.CharField(\n        verbose_name=_(\"Title\"),\n        help_text=_(\"The title of the article; what goes in the header\"),\n        blank=False,\n        max_length=80,\n    )\n\n    content = HTMLField(\n        verbose_name=_(\"Content\"),\n        help_text=_(\"The content of the article; what text to display.\"),\n        blank=False,\n        max_length=5000,\n    )\n\n    since = models.DateTimeField(\n        verbose_name=_(\"Display since\"),\n        help_text=_(\"Hide this article before this time.\"),\n        default=timezone.now,\n    )\n\n    until = models.DateTimeField(\n        verbose_name=_(\"Display until\"),\n        help_text=_(\"Hide this article after this time.\"),\n        blank=True,\n        null=True,\n    )\n\n    class Meta:\n        ordering = (\"-since\",)\n\n    def __str__(self):\n        return str(self.title)\n\n    @property\n    def is_visible(self):\n        \"\"\"Is this announcement currently visible.\"\"\"\n        return (\n            (self.until is None or self.until > timezone.now())\n            and (self.since is None or self.since <= timezone.now())\n            and not (self.since is None and self.until is None)\n        )\n\n\ndef validate_image(value):\n    return FileExtensionValidator(\n        allowed_extensions=[*get_available_image_extensions(), \"svg\"]\n    )(value)\n\n\nclass Slide(models.Model):\n    \"\"\"Describes an announcement.\"\"\"\n\n    objects = models.Manager()\n    visible_objects = VisibleObjectManager()\n\n    title = CharField(\n        verbose_name=_(\"Title\"),\n        help_text=_(\"The title of the slide; just for the admin.\"),\n        blank=False,\n        max_length=100,\n    )\n\n    content = models.FileField(\n        verbose_name=_(\"Content\"),\n        help_text=_(\"The content of the slide; what image to display.\"),\n        blank=False,\n        upload_to=\"public/announcements/slides/\",\n        validators=[validate_image],\n    )\n\n    since = models.DateTimeField(\n        verbose_name=_(\"Display since\"),\n        help_text=_(\n            \"Hide this slide before this time. When all date- and \"\n            \"time-fields are left blank, the slide won't \"\n            \"be visible. It will, however, be visible on an event-page \"\n            \"if it's linked to an event.\"\n        ),\n        default=timezone.now,\n        blank=True,\n        null=True,\n    )\n\n    until = models.DateTimeField(\n        verbose_name=_(\"Display until\"),\n        help_text=_(\"Hide this slide after this time.\"),\n        blank=True,\n        null=True,\n    )\n\n    order = models.PositiveIntegerField(\n        verbose_name=_(\"Order\"),\n        help_text=_(\"Approximately where this slide should appear in the order\"),\n        default=0,\n    )\n\n    members_only = models.BooleanField(\n        verbose_name=_(\"Display only for authenticated members\"), default=False\n    )\n\n    url = models.URLField(\n        verbose_name=_(\"Link\"),\n        help_text=_(\"Place the user is taken to when clicking the slide\"),\n        blank=True,\n        null=True,\n    )\n\n    url_blank = models.BooleanField(\n        verbose_name=_(\"Link outside thalia.nu\"),\n        help_text=_(\"Clicking the slide will open a new tab\"),\n        default=False,\n    )\n\n    class Meta:\n        ordering = (\"-since\",)\n\n    @property\n    def is_visible(self):\n        \"\"\"Is this slide currently visible.\"\"\"\n        return (\n            (self.until is None or self.until > timezone.now())\n            and (self.since is None or self.since <= timezone.now())\n            and not (self.since is None and self.until is None)\n        )\n\n    def __str__(self):\n        return str(self.title)\n", "path": "website/announcements/models.py"}]}