Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#5371 closed defect (fixed)

Collection atom feeds throw server error

Reported by: ayleph Owned by:
Priority: major Milestone: 0.9.0
Component: programming Keywords: atom, collections, migrations
Cc: tsyesika Parent Tickets:

Description

On latest master, I get the following error when trying to view the atom feed of a collection. Atom feed of a user still works fine.

Error - <type 'exceptions.TypeError'>: 'LocalUser' object is not callable
URL: https://goblinrefuge.com/mediagoblin/u/andrew/collection/concerts/atom/
File '/path/to/mediagoblin/lib/python2.7/site-packages/paste/exceptions/errormiddleware.py', line 144 in __call__
  app_iter = self.application(environ, sr_checker)
File '/path/to/mediagoblin/mediagoblin/app.py', line 342 in __call__
  return self.call_backend(environ, start_response)
File '/path/to/mediagoblin/lib/python2.7/site-packages/Werkzeug-0.10.1-py2.7.egg/werkzeug/wsgi.py', line 591 in __call__
  return self.app(environ, start_response)
File '/path/to/mediagoblin/mediagoblin/app.py', line 276 in call_backend
  return self._finish_call_backend(request, environ, start_response)
File '/path/to/mediagoblin/mediagoblin/app.py', line 318 in _finish_call_backend
  response = controller(request)
File '/path/to/mediagoblin/mediagoblin/user_pages/views.py', line 626 in collection_atom_feed
  'name': obj.get_actor().username,
TypeError: 'LocalUser' object is not callable

Change History (5)

comment:1 by ayleph, 9 years ago

Owner: ayleph removed
Status: newreview

Here is the fix.

From 12010da70cbe0614ac350dda4bf2561a0bab3531 Mon Sep 17 00:00:00 2001
From: ayleph <ayleph@thisshitistemp.com>
Date: Mon, 7 Dec 2015 11:38:21 -0500
Subject: [PATCH] Fix issue 5371 broken collection atom feeds

---
 mediagoblin/user_pages/views.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/mediagoblin/user_pages/views.py b/mediagoblin/user_pages/views.py
index ba94ec1..88e077d 100644
--- a/mediagoblin/user_pages/views.py
+++ b/mediagoblin/user_pages/views.py
@@ -623,10 +623,10 @@ def collection_atom_feed(request):
             id=obj.url_for_self(request.urlgen, qualified=True),
             content_type='html',
             author={
-                'name': obj.get_actor().username,
+                'name': obj.get_actor.username,
                 'uri': request.urlgen(
                     'mediagoblin.user_pages.user_home',
-                    qualified=True, user=obj.get_actor().username)},
+                    qualified=True, user=obj.get_actor.username)},
             updated=item.get('added'),
             links=[{
                 'href': obj.url_for_self(
-- 
2.6.3

comment:2 by Jessica Tallon, 9 years ago

Will review tomorrow :)

comment:3 by Jessica Tallon, 9 years ago

Have signed off and pushed to master, sorry I was lated than I had said I would be, christmas and new years was a hectic time. The commit on master is 47f7ff8.

comment:4 by Jessica Tallon, 9 years ago

Resolution: fixed
Status: reviewclosed

comment:5 by Christopher Allan Webber, 9 years ago

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.