Directory index rendering fails for non-admins.
Sentry Issue: ACE4-26
AttributeError: 'map' object has no attribute 'filter'
File "ace4/cms/views.py", line 201, in dispatch
return render_fileobject(request, path, obj, recurse, size_spec)
File "ace4/cms/views.py", line 558, in render_fileobject
content = dir_styles[style](request, path, obj)
File "ace4/cms/views.py", line 366, in render_directory_index
entries = entries.filter(status=S_PUBLISHED)
The problem here is that the .filter(status=S_PUBLISHED)
is applied to something that isn't a queryset anymore. We have to move the check a few lines up so we can still do it on a queryset.
Edited by Anselm Lingnau