Opened 9 years ago

Closed 9 years ago

#1021 closed defect (fixed)

Deleting an image breaks API feeds

Reported by: Jonas Haraldsson Owned by:
Priority: blocker Milestone: 0.8.0
Component: programming Keywords: api, feed
Cc: Parent Tickets:

Description

After deleting an image from the web interface, the /api/user/<nickname>/{inbox,feed} feeds returns http error 500

Error in log:

Error - <type 'exceptions.AttributeError'>: 'NoneType' object has no attribute 'serialize'
URL: http://mediagoblin.jonash.local/api/user/kabniel/feed
File '/srv/mediagoblin.local/mediagoblin/local/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 '/srv/mediagoblin.local/mediagoblin/mediagoblin/app.py', line 268 in __call__
  return self.call_backend(environ, start_response)
File '/srv/mediagoblin.local/mediagoblin/local/lib/python2.7/site-packages/Werkzeug-0.9.6-py2.7.egg/werkzeug/wsgi.py', line 588 in __call__
  return self.app(environ, start_response)
File '/srv/mediagoblin.local/mediagoblin/mediagoblin/app.py', line 245 in call_backend
  response = controller(request)
File '/srv/mediagoblin.local/mediagoblin/mediagoblin/decorators.py', line 427 in wrapper
  return controller(request, *args, **kwargs)
File '/srv/mediagoblin.local/mediagoblin/mediagoblin/federation/views.py', line 359 in feed_endpoint
  feed["items"].append(activity.serialize(request))
File '/srv/mediagoblin.local/mediagoblin/mediagoblin/db/mixin.py', line 455 in serialize
  "object": self.get_object.serialize(request),
AttributeError: 'NoneType' object has no attribute 'serialize'

Change History (3)

comment:1 by ayleph, 9 years ago

Keywords: feed added

comment:2 by Jessica Tallon, 9 years ago

Milestone: 0.8.0
Priority: majorblocker

comment:3 by Jessica Tallon, 9 years ago

Resolution: fixed
Status: newclosed

This has been fixed as of dd73391.

We're skipping over the activities which cause this. Hopefully soon we'll have soft-deleting which will stop this happening for all new activities. I don't think the code to skip the broken activities will ever be able to be removed because they're always going to be broken.

Note: See TracTickets for help on using tickets.