Possible bug in apply_active_filters

6 views
Skip to first unread message

Lucas Moeskops

unread,
Dec 8, 2014, 10:56:15 AM12/8/14
to django-...@googlegroups.com
In the function apply_active_filters of the feincms.utils.managers.ActiveAwareContentManagerMixin, if the manager would have no active_filters, the input queryset is returned. This gives the following behaviour:

If there are active_filters, MyRelatedManager.active() returns an iterable object.
If there are no active_filters, MyRelatedManager.active() returns MyRelatedManager, which is not an iterator.

Would it not be better to return queryset.all() in the latter case?

Regards,
Lucas Moeskops
Reply all
Reply to author
Forward
0 new messages