prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN ISSUE ---
  Projectcontainer active projects count broken
  https://mein.berlin.de/projects/stadtforum-berlin-wohnen/
  
  shows `7 of 4` active projects.
  
  --- END ISSUE ---
  
  Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
  --- BEGIN FILES ---
  Path: `meinberlin/apps/projectcontainers/models.py`
  Content:
  ```
  1 from django.db import models
  2 from django.utils import timezone
  3 from django.utils.translation import ugettext_lazy as _
  4 
  5 from adhocracy4.projects import models as project_models
  6 
  7 
  8 class ProjectContainer(project_models.Project):
  9     projects = models.ManyToManyField(
  10         project_models.Project,
  11         related_name='containers',
  12         verbose_name=_('Projects')
  13     )
  14 
  15     @property
  16     def not_archived_projects(self):
  17         return self.projects.filter(is_archived=False)
  18 
  19     @property
  20     def active_projects(self):
  21         now = timezone.now()
  22         return self.projects.filter(
  23             module__phase__start_date__lte=now,
  24             module__phase__end_date__gt=now)
  25 
  26     @property
  27     def phases(self):
  28         from adhocracy4.phases import models as phase_models
  29         return phase_models.Phase.objects\
  30             .filter(module__project__containers__id=self.id)
  31
  ```
  --- 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()
  
  ```
  
golden_diff: diff --git a/meinberlin/apps/projectcontainers/models.py b/meinberlin/apps/projectcontainers/models.py
  --- a/meinberlin/apps/projectcontainers/models.py
  +++ b/meinberlin/apps/projectcontainers/models.py
  @@ -21,7 +21,7 @@
           now = timezone.now()
           return self.projects.filter(
               module__phase__start_date__lte=now,
  -            module__phase__end_date__gt=now)
  +            module__phase__end_date__gt=now).distinct()
   
       @property
       def phases(self):
  
verification_info: {"golden_diff": "diff --git a/meinberlin/apps/projectcontainers/models.py b/meinberlin/apps/projectcontainers/models.py\n--- a/meinberlin/apps/projectcontainers/models.py\n+++ b/meinberlin/apps/projectcontainers/models.py\n@@ -21,7 +21,7 @@\n         now = timezone.now()\n         return self.projects.filter(\n             module__phase__start_date__lte=now,\n-            module__phase__end_date__gt=now)\n+            module__phase__end_date__gt=now).distinct()\n \n     @property\n     def phases(self):\n", "issue": "Projectcontainer active projects count broken\nhttps://mein.berlin.de/projects/stadtforum-berlin-wohnen/\r\n\r\nshows `7 of 4` active projects.\n", "before_files": [{"content": "from django.db import models\nfrom django.utils import timezone\nfrom django.utils.translation import ugettext_lazy as _\n\nfrom adhocracy4.projects import models as project_models\n\n\nclass ProjectContainer(project_models.Project):\n    projects = models.ManyToManyField(\n        project_models.Project,\n        related_name='containers',\n        verbose_name=_('Projects')\n    )\n\n    @property\n    def not_archived_projects(self):\n        return self.projects.filter(is_archived=False)\n\n    @property\n    def active_projects(self):\n        now = timezone.now()\n        return self.projects.filter(\n            module__phase__start_date__lte=now,\n            module__phase__end_date__gt=now)\n\n    @property\n    def phases(self):\n        from adhocracy4.phases import models as phase_models\n        return phase_models.Phase.objects\\\n            .filter(module__project__containers__id=self.id)\n", "path": "meinberlin/apps/projectcontainers/models.py"}], "after_files": [{"content": "from django.db import models\nfrom django.utils import timezone\nfrom django.utils.translation import ugettext_lazy as _\n\nfrom adhocracy4.projects import models as project_models\n\n\nclass ProjectContainer(project_models.Project):\n    projects = models.ManyToManyField(\n        project_models.Project,\n        related_name='containers',\n        verbose_name=_('Projects')\n    )\n\n    @property\n    def not_archived_projects(self):\n        return self.projects.filter(is_archived=False)\n\n    @property\n    def active_projects(self):\n        now = timezone.now()\n        return self.projects.filter(\n            module__phase__start_date__lte=now,\n            module__phase__end_date__gt=now).distinct()\n\n    @property\n    def phases(self):\n        from adhocracy4.phases import models as phase_models\n        return phase_models.Phase.objects\\\n            .filter(module__project__containers__id=self.id)\n", "path": "meinberlin/apps/projectcontainers/models.py"}]}