Opened 5 years ago

Closed 5 years ago

Last modified 5 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

Subtickets

Change History (5)

comment:1 Changed 5 years ago by ayleph

Owner: ayleph deleted
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 Changed 5 years ago by Jessica Tallon

Will review tomorrow :)

comment:3 Changed 5 years ago by Jessica Tallon

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 Changed 5 years ago by Jessica Tallon

Resolution: fixed
Status: reviewclosed

comment:5 Changed 5 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.