Skip to content
This repository has been archived by the owner on May 5, 2021. It is now read-only.

Fix invite email links #136

Merged
merged 5 commits into from
Jul 11, 2017
Merged

Fix invite email links #136

merged 5 commits into from
Jul 11, 2017

Conversation

slomo
Copy link
Contributor

@slomo slomo commented Jun 21, 2017

No description provided.

 - make templatename independet of model that has been invited to
Copy link
Contributor

@fuzzylogic2000 fuzzylogic2000 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now it will not send the invitation: when I click submit, I get:
invite() takes 3 positional arguments but 4 were given

@slomo
Copy link
Contributor Author

slomo commented Jun 22, 2017

Stacktrace or didn't happen 😄

@fuzzylogic2000
Copy link
Contributor

fuzzylogic2000 commented Jun 22, 2017

Environment:

Request Method: POST
Request URL: http://localhost:8000/en/ideas/create/module/ideas2017/

Django Version: 1.8.18
Python Version: 3.5.2
Installed Applications:
['wagtail.contrib.settings',
 'wagtail.wagtailforms',
 'wagtail.wagtailredirects',
 'wagtail.wagtailembeds',
 'wagtail.wagtailsites',
 'wagtail.wagtailusers',
 'wagtail.wagtailsnippets',
 'wagtail.wagtaildocs',
 'wagtail.wagtailimages',
 'wagtail.wagtailsearch',
 'wagtail.wagtailadmin',
 'wagtail.wagtailcore',
 'wagtail.contrib.wagtailstyleguide',
 'modelcluster',
 'taggit',
 'multiselectfield',
 'widget_tweaks',
 'crispy_forms',
 'webpack_loader',
 'easy_thumbnails',
 'ckeditor',
 'ckeditor_uploader',
 'django.contrib.sites',
 'django.contrib.admin',
 'django.contrib.auth',
 'django.contrib.contenttypes',
 'django_countries',
 'django.contrib.sessions',
 'django.contrib.messages',
 'django.contrib.staticfiles',
 'rest_framework',
 'formtools',
 'autofixture',
 'rules.apps.AutodiscoverRulesConfig',
 'allauth',
 'allauth.account',
 'allauth.socialaccount',
 'adhocracy4.images.apps.ImagesConfig',
 'adhocracy4.phases.apps.PhasesConfig',
 'adhocracy4.projects.apps.ProjectsConfig',
 'adhocracy4.ratings.apps.RatingsConfig',
 'adhocracy4.reports.apps.ReportsConfig',
 'adhocracy4.modules.apps.ModulesConfig',
 'adhocracy4.comments.apps.CommentsConfig',
 'adhocracy4.organisations.apps.OrganisationsConfig',
 'cms.home.apps.HomeConfig',
 'cms.settings.apps.SettingsConfig',
 'cms.snippets.apps.SnippetsConfig',
 'cms.blog.apps.BlogConfig',
 'apps.contrib',
 'apps.users.apps.UsersConfig',
 'apps.ideas.apps.IdeasConfig',
 'apps.invites.apps.InvitesConfig',
 'debug_toolbar']
Installed Middleware:
['debug_toolbar.middleware.DebugToolbarMiddleware',
 'django.contrib.sessions.middleware.SessionMiddleware',
 'django.middleware.common.CommonMiddleware',
 'django.middleware.csrf.CsrfViewMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware',
 'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
 'django.contrib.messages.middleware.MessageMiddleware',
 'django.middleware.clickjacking.XFrameOptionsMiddleware',
 'django.middleware.security.SecurityMiddleware',
 'django.middleware.locale.LocaleMiddleware',
 'wagtail.wagtailcore.middleware.SiteMiddleware',
 'wagtail.wagtailredirects.middleware.RedirectMiddleware']


Traceback:
File "/home/katharina/a4-advocate-europe/lib/python3.5/site-packages/django/core/handlers/base.py" in get_response
  132.                     response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/home/katharina/a4-advocate-europe/lib/python3.5/site-packages/django/views/generic/base.py" in view
  71.             return self.dispatch(request, *args, **kwargs)
File "/home/katharina/a4-advocate-europe/lib/python3.5/site-packages/rules/compat/access_mixins.py" in dispatch
  126.         return super(PermissionRequiredMixin, self).dispatch(request, *args, **kwargs)
File "/home/katharina/a4-advocate-europe/apps/ideas/mixins.py" in dispatch
  25.         return super().dispatch(request, *args, **kwargs)
File "/home/katharina/a4-advocate-europe/lib/python3.5/site-packages/formtools/wizard/views.py" in dispatch
  244.         response = super(WizardView, self).dispatch(request, *args, **kwargs)
File "/home/katharina/a4-advocate-europe/lib/python3.5/site-packages/django/views/generic/base.py" in dispatch
  89.         return handler(request, *args, **kwargs)
File "/home/katharina/a4-advocate-europe/apps/wizards/mixins.py" in post
  69.                 return self.render_done(form, **kwargs)
File "/home/katharina/a4-advocate-europe/lib/python3.5/site-packages/formtools/wizard/views.py" in render_done
  361.         done_response = self.done(final_forms.values(), form_dict=final_forms, **kwargs)
File "/home/katharina/a4-advocate-europe/apps/ideas/views.py" in done
  111.                 email

Exception Type: TypeError at /en/ideas/create/module/ideas2017/
Exception Value: invite() takes 3 positional arguments but 4 were given

@slomo
Copy link
Contributor Author

slomo commented Jul 6, 2017

Fixed the issue discovered by @fuzzylogic2000 seems there is no test for actually sending an invite if idea sketches are created.

@mkind
Copy link
Contributor

mkind commented Jul 11, 2017

LGTM

@mkind mkind merged commit 35a754e into master Jul 11, 2017
@slomo slomo deleted the ym-2017-06-fix-invite-email-links branch September 20, 2017 11:21
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants