Opened 18 years ago
Last modified 17 years ago
#4404 closed
LatestCommentsFeed causing AssertionError due to slicing — at Initial Version
Reported by: | 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
- response = callback(request, *callback_args, callback_kwargs)
File "/usr/lib/python2.5/site-packages/django/contrib/syndication/
views.py" in feed
- feedgen = f(slug, request.path).get_feed(param)
File "/usr/lib/python2.5/site-packages/django/contrib/syndication/
feeds.py" in get_feed
- 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
- return attr()
File "/usr/lib/python2.5/site-packages/django/contrib/comments/
feeds.py" in items
- qs = qs.filter(is_removed=False)
File "/usr/lib/python2.5/site-packages/django/db/models/query.py" in
filter
- return self._filter_or_exclude(None, *args, kwargs)
File "/usr/lib/python2.5/site-packages/django/db/models/query.py" in
_filter_or_exclude
- "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!