Opened 12 years ago

Closed 11 years ago

#570 closed defect (fixed)

Crash after adding media to an unspecified collection

Reported by: Jef van Schendel Owned by:
Priority: major Milestone: 0.3.3
Component: programming Keywords:
Cc: Parent Tickets:


To reproduce:

  • Go to a media page
  • Click "Add media to collection"
  • On the resulting page, don't select a collection from the dropdown so it stays on "-- Select --"
  • Click "Add"
  • MediaGoblin crashes with this message: "AttributeError: 'NoneType' object has no attribute 'id'"

Possible options:

  • Return an error when no collection is specified
  • Remove the "-- Select --" option from the dropdown (thereby automatically selecting a certain collection - maybe the default "Favorites" collection we talked about?)

Change History (4)

comment:1 by Jef van Schendel, 12 years ago

Here's the full output:

Error - <type 'exceptions.AttributeError'>: 'NoneType' object has no attribute 'id'
File '/usr/lib/python2.7/site-packages/paste/exceptions/', line 144 in __call__
  app_iter = self.application(environ, sr_checker)
File '/usr/lib/python2.7/site-packages/paste/', line 203 in __call__
  return app(environ, start_response)
File '/home/jef/mediagoblin/lib/python2.7/site-packages/Beaker-1.5.4-py2.7.egg/beaker/', line 152 in __call__
  return self.wrap_app(environ, session_start_response)
File '/home/jef/mediagoblin/mediagoblin/', line 234 in __call__
  return self.call_backend(environ, start_response)
File '/home/jef/mediagoblin/mediagoblin/', line 221 in call_backend
  response = controller(request)
File '/home/jef/mediagoblin/mediagoblin/', line 153 in wrapper
  return controller(request, media=media, *args, **kwargs)
File '/home/jef/mediagoblin/mediagoblin/', line 52 in new_controller_func
  return controller(request, *args, **kwargs)
File '/home/jef/mediagoblin/mediagoblin/user_pages/', line 224 in media_collect
  collection_item.collection =
AttributeError: 'NoneType' object has no attribute 'id'

comment:2 by Elrond, 12 years ago

Milestone: 0.3.3

comment:3 by spaetz, 11 years ago

I don't see this error at all. When I do that I get a message:

"You have to select or add a collection". Can you still reproduce this? (I use Firefox)

comment:4 by Jef van Schendel, 11 years ago

Resolution: fixed
Status: newclosed

I cannot reproduce it either. Assuming it was fixed.

Note: See TracTickets for help on using tickets.