Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ThumbnailNode child_nodelists 'nodelist_file' is not a list #470

Open
Ecno92 opened this issue Nov 1, 2016 · 3 comments
Open

ThumbnailNode child_nodelists 'nodelist_file' is not a list #470

Ecno92 opened this issue Nov 1, 2016 · 3 comments

Comments

@Ecno92
Copy link

Ecno92 commented Nov 1, 2016

Today I hit a exception while I was trying to compress with Django compressor.
I was not the only one who was seeing this exception. So I quickly found a open PR for that.
It seemed like more people were seeing this exception in combination with sorl-thumbnail.

django-compressor/django-compressor#605

As you can see in this pull request it tries to patch the fact that a nodelist of a node may not return a list which crashes the compressor.

The ThumbnailNode contains a 'nodelist_file' in the child_nodelists attribute. As you read the code you see that this value may stay None.

I'm not sure if his is correct. The NodeList class of the django template base module inherits from a list. So it seems that 'nodelist_file' should also be a (empty) list.
https://github.com/django/django/blob/master/django/template/base.py#L984

Can someone check this situation and provide us feedback so we get more insights if the 'nodelist_file' attribute should remain like it is or if it should be changed.

@jaddison
Copy link

I have seen this exact same behaviour.

@jaddison
Copy link

This is still a problem with django-compressor.

@jaddison
Copy link

The fix has been merged into django-compressor's develop branch, but has not been released on PyPi yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants