Opened 17 years ago

Last modified 17 years ago

#4404 closed

LatestCommentsFeed causing AssertionError due to slicing — at Initial Version

Reported by: Stuart Williams <stuart@…> Owned by: Adrian Holovaty
Component: contrib.comments Version: dev
Severity: Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

LatestCommentsFeed from contrib/comments/feeds.py calls upon LatestFreeCommentsFeed, which slices the result. This causes an AssertionError:

Traceback (most recent call last):
File "/usr/lib/python2.5/site-packages/django/core/handlers/base.py"
in get_response

  1. response = callback(request, *callback_args, callback_kwargs)

File "/usr/lib/python2.5/site-packages/django/contrib/syndication/
views.py" in feed

  1. feedgen = f(slug, request.path).get_feed(param)

File "/usr/lib/python2.5/site-packages/django/contrib/syndication/
feeds.py" in get_feed

  1. for item in self.get_dynamic_attr('items', obj):

File "/usr/lib/python2.5/site-packages/django/contrib/syndication/
feeds.py" in get_dynamic_attr

  1. return attr()

File "/usr/lib/python2.5/site-packages/django/contrib/comments/
feeds.py" in items

  1. qs = qs.filter(is_removed=False)

File "/usr/lib/python2.5/site-packages/django/db/models/query.py" in
filter

  1. return self._filter_or_exclude(None, *args, kwargs)

File "/usr/lib/python2.5/site-packages/django/db/models/query.py" in
_filter_or_exclude

  1. "Cannot filter a query once a slice has been taken."

AssertionError at /rss/comments/
Cannot filter a query once a slice has been taken.

Sorry about the lack of further details, but I'm pretty new to both Python and Django... Thanks!

Change History (0)

Note: See TracTickets for help on using tickets.
Back to Top