Repository: liqd/a4-product

Issue:
poll-comment export seems to be broken
```
Environment:


Request Method: GET
Request URL: http://localhost:8004/liqd-orga/dashboard/modules/umfrage/poll/export/

Django Version: 2.2.6
Python Version: 3.7.3
Installed Applications:
('django.contrib.sites',
 'django.contrib.admin',
 'django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.sessions',
 'django.contrib.sitemaps',
 'django.contrib.messages',
 'django.contrib.staticfiles',
 'django.contrib.humanize',
 'widget_tweaks',
 'rest_framework',
 'allauth',
 'allauth.account',
 'allauth.socialaccount',
 'rules.apps.AutodiscoverRulesConfig',
 'easy_thumbnails',
 'ckeditor',
 'ckeditor_uploader',
 'capture_tag',
 'background_task',
 'wagtail.contrib.forms',
 'wagtail.contrib.redirects',
 'wagtail.contrib.settings',
 'wagtail.contrib.styleguide',
 'wagtail.embeds',
 'wagtail.sites',
 'wagtail.users',
 'wagtail.snippets',
 'wagtail.documents',
 'wagtail.images',
 'wagtail.search',
 'wagtail.admin',
 'wagtail.core',
 'modelcluster',
 'taggit',
 'apps.cms.pages',
 'apps.cms.settings',
 'apps.cms.contacts',
 'apps.cms.news',
 'apps.cms.use_cases',
 'apps.cms.images',
 'adhocracy4.actions',
 'adhocracy4.administrative_districts',
 'adhocracy4.categories',
 'adhocracy4.ckeditor',
 'adhocracy4.comments',
 'adhocracy4.dashboard',
 'adhocracy4.filters',
 'adhocracy4.follows',
 'adhocracy4.forms',
 'adhocracy4.images',
 'adhocracy4.labels',
 'adhocracy4.maps',
 'adhocracy4.modules',
 'adhocracy4.organisations',
 'adhocracy4.phases',
 'adhocracy4.projects',
 'adhocracy4.ratings',
 'adhocracy4.reports',
 'adhocracy4.rules',
 'apps.actions',
 'apps.contrib',
 'apps.likes',
 'apps.maps',
 'apps.moderatorfeedback',
 'apps.moderatorremark',
 'apps.newsletters',
 'apps.notifications',
 'apps.organisations',
 'apps.partners',
 'apps.questions',
 'apps.users',
 'apps.account',
 'apps.dashboard',
 'apps.embed',
 'apps.exports',
 'apps.offlineevents',
 'apps.projects',
 'apps.activities',
 'apps.budgeting',
 'apps.documents',
 'apps.ideas',
 'apps.mapideas',
 'apps.polls',
 'allauth.socialaccount.providers.facebook',
 'allauth.socialaccount.providers.github',
 'allauth.socialaccount.providers.google',
 'allauth.socialaccount.providers.twitter')
Installed Middleware:
('django.middleware.security.SecurityMiddleware',
 'whitenoise.middleware.WhiteNoiseMiddleware',
 'django.middleware.csrf.CsrfViewMiddleware',
 'django.middleware.clickjacking.XFrameOptionsMiddleware',
 'django_cloudflare_push.middleware.push_middleware',
 'django.contrib.sessions.middleware.SessionMiddleware',
 'django.middleware.locale.LocaleMiddleware',
 'django.middleware.common.CommonMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware',
 'django.contrib.messages.middleware.MessageMiddleware',
 'apps.embed.middleware.AjaxPathMiddleware',
 'wagtail.core.middleware.SiteMiddleware',
 'wagtail.contrib.redirects.middleware.RedirectMiddleware')



Traceback:

File "/home/katharina/a4-product/venv/lib/python3.7/site-packages/django/core/handlers/exception.py" in inner
  34.             response = get_response(request)

File "/home/katharina/a4-product/venv/lib/python3.7/site-packages/django/core/handlers/base.py" in _get_response
  115.                 response = self.process_exception_by_middleware(e, request)

File "/home/katharina/a4-product/venv/lib/python3.7/site-packages/django/core/handlers/base.py" in _get_response
  113.                 response = wrapped_callback(request, *callback_args, **callback_kwargs)

File "/home/katharina/a4-product/venv/lib/python3.7/site-packages/django/views/generic/base.py" in view
  71.             return self.dispatch(request, *args, **kwargs)

File "/home/katharina/a4-product/venv/lib/python3.7/site-packages/django/contrib/auth/mixins.py" in dispatch
  85.         return super().dispatch(request, *args, **kwargs)

File "/home/katharina/a4-product/venv/lib/python3.7/site-packages/django/views/generic/base.py" in dispatch
  97.         return handler(request, *args, **kwargs)

File "/home/katharina/a4-product/venv/lib/python3.7/site-packages/django/views/generic/base.py" in get
  158.         context = self.get_context_data(**kwargs)

File "/home/katharina/a4-product/apps/polls/views.py" in get_context_data
  84.             kwargs={'module_slug': self.module.slug})

File "/home/katharina/a4-product/venv/lib/python3.7/site-packages/django/urls/base.py" in reverse
  90.     return iri_to_uri(resolver._reverse_with_prefix(view, prefix, *args, **kwargs))

File "/home/katharina/a4-product/venv/lib/python3.7/site-packages/django/urls/resolvers.py" in _reverse_with_prefix
  673.         raise NoReverseMatch(msg)

Exception Type: NoReverseMatch at /liqd-orga/dashboard/modules/umfrage/poll/export/
Exception Value: Reverse for 'poll-comment-export' with keyword arguments '{'module_slug': 'umfrage'}' not found. 1 pattern(s) tried: ['(?P<organisation_slug>[-\\w_]+)/dashboard/modules/(?P<module_slug>[-\\w_]+)/poll/export/comments/$']
```


Discussion:
looks like there is an reverse without the organisation slug

Resolving patch:
diff --git a/apps/polls/views.py b/apps/polls/views.py
--- a/apps/polls/views.py
+++ b/apps/polls/views.py
@@ -81,5 +81,8 @@ def get_context_data(self, **kwargs):
         context = super().get_context_data(**kwargs)
         context['comment_export'] = reverse(
             'a4dashboard:poll-comment-export',
-            kwargs={'module_slug': self.module.slug})
+            kwargs={
+                'organisation_slug': self.module.project.organisation.slug,
+                'module_slug': self.module.slug
+            })
         return context


Test patch: