Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#5390 closed defect (fixed)

Exception when deleting media that has CommentNotifications on them.

Reported by: Jessica Tallon Owned by:
Priority: blocker Milestone: 0.9.0
Component: programming Keywords: db
Cc: Parent Tickets:

Description

When deleting media that has comments and those comments have CommentNotification models, it seems to raise an error for those users. I can reproduce this by:

  1. Create two users I'll call them "Chris" and "Tsyesika"
  2. As Chris post an image
  3. Login as Tsyesika and post a comment on said image
  4. Make Tsyesika admin
  5. Delete the image
  6. Try to login as Chris

Those steps should trigger this exception:

Error - <class 'jinja2.exceptions.UndefinedError'>: 'mediagoblin.db.models.Graveyard object' has no attribute 'get_reply_to'
URL: https://dev.tsyesika.se/
File '/home/tsyesika/mediagoblin/lib/python2.7/site-packages/Paste-1.7.5.1-py2.7.egg/paste/exceptions/errormiddleware.py', line 144 in __call__
  app_iter = self.application(environ, sr_checker)
File '/home/tsyesika/mediagoblin/mediagoblin/app.py', line 342 in __call__
  return self.call_backend(environ, start_response)
File '/home/tsyesika/mediagoblin/lib/python2.7/site-packages/werkzeug/wsgi.py', line 591 in __call__
  return self.app(environ, start_response)
File '/home/tsyesika/mediagoblin/mediagoblin/app.py', line 276 in call_backend
  return self._finish_call_backend(request, environ, start_response)
File '/home/tsyesika/mediagoblin/mediagoblin/app.py', line 318 in _finish_call_backend
  response = controller(request)
File '/home/tsyesika/mediagoblin/mediagoblin/views.py', line 46 in root_view
  return view(request)
File '/home/tsyesika/mediagoblin/mediagoblin/decorators.py', line 47 in wrapper
  return controller(request, *args, **kwargs)
File '/home/tsyesika/mediagoblin/mediagoblin/decorators.py', line 170 in wrapper
  return controller(request, page=page, *args, **kwargs)
File '/home/tsyesika/mediagoblin/mediagoblin/views.py', line 37 in default_root_view
  'pagination': pagination})
File '/home/tsyesika/mediagoblin/mediagoblin/tools/response.py', line 36 in render_to_response
  render_template(request, template, context),
File '/home/tsyesika/mediagoblin/mediagoblin/tools/template.py', line 144 in render_template
  rendered = template.render(context)
File '/home/tsyesika/mediagoblin/lib/python2.7/site-packages/Jinja2-2.8-py2.7.egg/jinja2/environment.py', line 989 in render
  return self.environment.handle_exception(exc_info, True)
File '/home/tsyesika/mediagoblin/lib/python2.7/site-packages/Jinja2-2.8-py2.7.egg/jinja2/environment.py', line 754 in handle_exception
  reraise(exc_type, exc_value, tb)
File '/home/tsyesika/mediagoblin/mediagoblin/templates/mediagoblin/root.html', line 22 in top-level template code
  {% set feed_url = request.urlgen('mediagoblin.listings.atom_feed') %}
File '/home/tsyesika/mediagoblin/mediagoblin/templates/mediagoblin/base.html', line 67 in top-level template code
  {% block mediagoblin_body %}
File '/home/tsyesika/mediagoblin/mediagoblin/templates/mediagoblin/base.html', line 69 in block "mediagoblin_body"
  {% block mediagoblin_header %}
File '/home/tsyesika/mediagoblin/mediagoblin/templates/mediagoblin/base.html', line 183 in block "mediagoblin_header"
  {% include 'mediagoblin/fragments/header_notifications.html' %}
File '/home/tsyesika/mediagoblin/mediagoblin/templates/mediagoblin/fragments/header_notifications.html', line 9 in top-level template code
  {% set media = comment.get_reply_to() %}
UndefinedError: 'mediagoblin.db.models.Graveyard object' has no attribute 'get_reply_to'

Subtickets

Change History (2)

comment:1 Changed 7 years ago by Jessica Tallon

Owner: Jessica Tallon deleted
Resolution: fixed
Status: newclosed

This is now fixed as of 8de5a93.

comment:2 Changed 7 years ago by Christopher Allan Webber

Milestone: 0.8.20.9.0

All 0.8.2 tickets are being rolled over to 0.9.0

Note: See TracTickets for help on using tickets.