AttributeError at /postorius/users/address_activation/

Bug #1430682 reported by Ashish
22
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Postorius
Fix Committed
Undecided
Unassigned

Bug Description

Steps to reproduce this bug:

1. Setup mailman, mailman.client, postorius in your local machine.
2. Go to http://127.0.0.1:8000/postorius/users/address_activation/
3. Go to add email address bar and fill a valid email address then click on save

Result: Getting an attribute error. Traceback [1].

What should be: Given email address should be added .

Traceback[1]:
Traceback:
File "/home/ashish/mailman/mm2/local/lib/python2.7/site-packages/Django-1.7.5-py2.7.egg/django/core/handlers/base.py" in get_response
  111. response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/home/ashish/mailman/mm2/local/lib/python2.7/site-packages/Django-1.7.5-py2.7.egg/django/views/generic/base.py" in view
  69. return self.dispatch(request, *args, **kwargs)
File "/home/ashish/mailman/mm2/local/lib/python2.7/site-packages/Django-1.7.5-py2.7.egg/django/views/generic/base.py" in dispatch
  87. return handler(request, *args, **kwargs)
File "/home/ashish/mailman/mm2/local/lib/python2.7/site-packages/Django-1.7.5-py2.7.egg/django/utils/decorators.py" in _wrapper
  29. return bound_func(*args, **kwargs)
File "/home/ashish/mailman/mm2/local/lib/python2.7/site-packages/Django-1.7.5-py2.7.egg/django/contrib/auth/decorators.py" in _wrapped_view
  21. return view_func(request, *args, **kwargs)
File "/home/ashish/mailman/mm2/local/lib/python2.7/site-packages/Django-1.7.5-py2.7.egg/django/utils/decorators.py" in bound_func
  25. return func.__get__(self, type(self))(*args2, **kwargs2)
File "/home/ashish/mailman/mm2/postorius/src/postorius/views/user.py" in post
  248. profile.send_confirmation_link(request)
File "/home/ashish/mailman/mm2/postorius/src/postorius/models.py" in send_confirmation_link
  294. getattr(settings, 'EMAIL_CONFIRMATION_FROM'),
File "/home/ashish/mailman/mm2/local/lib/python2.7/site-packages/Django-1.7.5-py2.7.egg/django/conf/__init__.py" in __getattr__
  47. return getattr(self._wrapped, name)

Exception Type: AttributeError at /postorius/users/address_activation/
Exception Value: 'Settings' object has no attribute 'EMAIL_CONFIRMATION_FROM'

Tags: postorius

Related branches

Ashish (coolyashish)
Changed in postorius:
status: New → In Progress
assignee: nobody → Ashish (coolyashish)
Revision history for this message
Ashish (coolyashish) wrote :

I have fixed this bug. Kindly find the attached patch.

Revision history for this message
Pavan Koli (pskoli93) wrote :

I saw your patch, that's similar to one I had submitted initially but Florian pointed out that it is not the right way(https://bugs.launchpad.net/postorius/+bug/1437866/comments/2)

So I submitted another patch, that now solves the problem and issues a proper ImproperConfiguration error instead of Attribute error.

First it checks the EMAIL_CONFIRMATION_FROM if that is not set than it checks for DEFAULT_FROM_EMAIL. If both are not configured than it issues a ImproperConfigurationError instead of the AttributeError, at least that helps in understanding that there is a problem in configuration and not the code.

Pavan Koli (pskoli93)
tags: added: postorius
Pavan Koli (pskoli93)
Changed in postorius:
status: In Progress → Fix Committed
Ashish (coolyashish)
Changed in postorius:
assignee: Ashish (coolyashish) → nobody
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.