Opened 10 years ago
Closed 10 years ago
#1078 closed defect (fixed)
/api/user/<user>/inbox gives error 500
Reported by: | Jonas Haraldsson | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | 0.8.0 |
Component: | programming | Keywords: | api, inbox |
Cc: | Parent Tickets: |
Description
Error - <type 'exceptions.AttributeError'>: 'list' object has no attribute 'order_by' URL: http://mediagoblin.jonash.local/api/user/kabniel/inbox 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 342 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 276 in call_backend return self._finish_call_backend(request, environ, start_response) File '/srv/mediagoblin.local/mediagoblin/mediagoblin/app.py', line 318 in _finish_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 163 in inbox_endpoint inbox = inbox.order_by(Activity.published.desc()) AttributeError: 'list' object has no attribute 'order_by'
Change History (2)
comment:2 by , 10 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
You're right .all
does indeed return a list. Removing .all
has fixed the issue, which is no on master as of 95dbed2.
Note:
See TracTickets
for help on using tickets.
I'm not experienced in sqlalchemy, but possibly fixed by removing
.all()
in views.py, line 159..all()
returns python list, which i dont think we want.