prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  archived projects accessible via activity feed
   At https://www.beteiligung.in/liqd/ all projects are private but I can see the content of the projects if I click on the activity feed. Even if not signed in.
  
  </issue>
  <code>
  [start of apps/organisations/views.py]
  1 from django.contrib.messages.views import SuccessMessageMixin
  2 from django.utils.translation import ugettext_lazy as _
  3 from django.views import generic
  4 from django.views.generic import DetailView
  5 
  6 from adhocracy4.actions.models import Action
  7 from adhocracy4.projects.models import Project
  8 from adhocracy4.rules import mixins as rules_mixins
  9 from apps.projects import query
  10 
  11 from . import forms
  12 from .models import Organisation
  13 
  14 
  15 class OrganisationView(DetailView):
  16     template_name = 'organisation_landing_page.html'
  17     model = Organisation
  18     slug_url_kwarg = 'organisation_slug'
  19 
  20     def get_context_data(self, **kwargs):
  21         context = super().get_context_data(**kwargs)
  22 
  23         project_list = Project.objects\
  24             .filter(organisation=self.object,
  25                     is_archived=False,
  26                     is_draft=False)
  27         project_list = query.filter_viewable(
  28             project_list, self.request.user
  29         )
  30         context['project_list'] = project_list
  31 
  32         context['action_list'] = Action.objects\
  33             .filter(project__organisation=self.object)\
  34             .filter_public()\
  35             .exclude_updates()[:4]
  36 
  37         context['stats'] = {
  38             'users': 1204,
  39             'items': 3425,
  40             'comments': 23234,
  41             'ratings': 134234,
  42         }
  43 
  44         return context
  45 
  46 
  47 class InformationView(DetailView):
  48     template_name = 'organisation_information.html'
  49     model = Organisation
  50     slug_url_kwarg = 'organisation_slug'
  51 
  52 
  53 class ImprintView(DetailView):
  54     template_name = 'organisation_imprint.html'
  55     model = Organisation
  56     slug_url_kwarg = 'organisation_slug'
  57 
  58 
  59 class OrganisationUpdateView(rules_mixins.PermissionRequiredMixin,
  60                              SuccessMessageMixin,
  61                              generic.UpdateView):
  62     model = Organisation
  63     form_class = forms.OrganisationForm
  64     slug_url_kwarg = 'organisation_slug'
  65     template_name = 'organisation_form.html'
  66     success_message = _('Organisation successfully updated.')
  67     permission_required = 'a4_candy_organisations.change_organisation'
  68     menu_item = 'organisation'
  69 
  70     def get_success_url(self):
  71         return self.request.path
  72
  [end of apps/organisations/views.py]
  </code>
  
  I need you to solve this issue by generating a single patch file that I can apply directly to this repository using git apply. Please respond with a single patch file in the following format.
  <patch>
  diff --git a/file.py b/file.py
  --- a/file.py
  +++ b/file.py
  @@ -1,27 +1,35 @@
   def euclidean(a, b):
  -    while b:
  -        a, b = b, a % b
  -    return a
  +    if b == 0:
  +        return a
  +    return euclidean(b, a % b)
   
   
   def bresenham(x0, y0, x1, y1):
       points = []
       dx = abs(x1 - x0)
       dy = abs(y1 - y0)
  -    sx = 1 if x0 < x1 else -1
  -    sy = 1 if y0 < y1 else -1
  -    err = dx - dy
  +    x, y = x0, y0
  +    sx = -1 if x0 > x1 else 1
  +    sy = -1 if y0 > y1 else 1
   
  -    while True:
  -        points.append((x0, y0))
  -        if x0 == x1 and y0 == y1:
  -            break
  -        e2 = 2 * err
  -        if e2 > -dy:
  -            err -= dy
  -            x0 += sx
  -        if e2 < dx:
  -            err += dx
  -            y0 += sy
  +    if dx > dy:
  +        err = dx / 2.0
  +        while x != x1:
  +            points.append((x, y))
  +            err -= dy
  +            if err < 0:
  +                y += sy
  +                err += dx
  +            x += sx
  +    else:
  +        err = dy / 2.0
  +        while y != y1:
  +            points.append((x, y))
  +            err -= dx
  +            if err < 0:
  +                x += sx
  +                err += dy
  +            y += sy
  +
  +    points.append((x, y))
       return points
  
  </patch>
golden_diff: diff --git a/apps/organisations/views.py b/apps/organisations/views.py
  --- a/apps/organisations/views.py
  +++ b/apps/organisations/views.py
  @@ -31,6 +31,7 @@
   
           context['action_list'] = Action.objects\
               .filter(project__organisation=self.object)\
  +            .filter(project__is_archived=False) \
               .filter_public()\
               .exclude_updates()[:4]
  
verification_info: {"golden_diff": "diff --git a/apps/organisations/views.py b/apps/organisations/views.py\n--- a/apps/organisations/views.py\n+++ b/apps/organisations/views.py\n@@ -31,6 +31,7 @@\n \n         context['action_list'] = Action.objects\\\n             .filter(project__organisation=self.object)\\\n+            .filter(project__is_archived=False) \\\n             .filter_public()\\\n             .exclude_updates()[:4]\n", "issue": "archived projects accessible via activity feed\n At https://www.beteiligung.in/liqd/ all projects are private but I can see the content of the projects if I click on the activity feed. Even if not signed in.\n", "before_files": [{"content": "from django.contrib.messages.views import SuccessMessageMixin\nfrom django.utils.translation import ugettext_lazy as _\nfrom django.views import generic\nfrom django.views.generic import DetailView\n\nfrom adhocracy4.actions.models import Action\nfrom adhocracy4.projects.models import Project\nfrom adhocracy4.rules import mixins as rules_mixins\nfrom apps.projects import query\n\nfrom . import forms\nfrom .models import Organisation\n\n\nclass OrganisationView(DetailView):\n    template_name = 'organisation_landing_page.html'\n    model = Organisation\n    slug_url_kwarg = 'organisation_slug'\n\n    def get_context_data(self, **kwargs):\n        context = super().get_context_data(**kwargs)\n\n        project_list = Project.objects\\\n            .filter(organisation=self.object,\n                    is_archived=False,\n                    is_draft=False)\n        project_list = query.filter_viewable(\n            project_list, self.request.user\n        )\n        context['project_list'] = project_list\n\n        context['action_list'] = Action.objects\\\n            .filter(project__organisation=self.object)\\\n            .filter_public()\\\n            .exclude_updates()[:4]\n\n        context['stats'] = {\n            'users': 1204,\n            'items': 3425,\n            'comments': 23234,\n            'ratings': 134234,\n        }\n\n        return context\n\n\nclass InformationView(DetailView):\n    template_name = 'organisation_information.html'\n    model = Organisation\n    slug_url_kwarg = 'organisation_slug'\n\n\nclass ImprintView(DetailView):\n    template_name = 'organisation_imprint.html'\n    model = Organisation\n    slug_url_kwarg = 'organisation_slug'\n\n\nclass OrganisationUpdateView(rules_mixins.PermissionRequiredMixin,\n                             SuccessMessageMixin,\n                             generic.UpdateView):\n    model = Organisation\n    form_class = forms.OrganisationForm\n    slug_url_kwarg = 'organisation_slug'\n    template_name = 'organisation_form.html'\n    success_message = _('Organisation successfully updated.')\n    permission_required = 'a4_candy_organisations.change_organisation'\n    menu_item = 'organisation'\n\n    def get_success_url(self):\n        return self.request.path\n", "path": "apps/organisations/views.py"}]}