Problem deleting notifications
 

Trying to delete all notifications raises this error:

Traceback (most recent call last):

File "/usr/local/lib/python2.7/dist-packages/Django-1.4.2-py2.7.egg/django/core/handlers/base.py", line 111, in get_response
    response = callback(request, *callback_args, **callback_kwargs)

File "/usr/local/lib/python2.7/dist-packages/Django-1.4.2-py2.7.egg/django/views/decorators/csrf.py", line 77, in wrapped_view
    return view_func(*args, **kwargs)

File "/var/www/askbot-devel/askbot/views/commands.py", line 876, in read_message
    request.user.delete_messages()

File "/var/www/askbot-devel/askbot/models/__init__.py", line 2284, in delete_messages
    self.message_set.all().delete()

AttributeError: 'RelatedObjectSimulator' object has no attribute 'all'

To enter a block of code:

  • enter empty line after your previous text
  • paste or type the code
  • select the code and press the button above
Preview: (hide)
mornaner's avatar
109
mornaner
asked 12 years ago

Comments

Could you try the latest code now, I've added the .all() method.

Evgeny's avatar Evgeny (12 years ago)

@Evgeny Just tested it and it works. If you put it as an answer I'll accept it.

mornaner's avatar mornaner (12 years ago)
see more comments