Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Fix crashing when node attribute is set to None #825
The compress command was crashing when https://github.com/batiste/django-page-cms was added to project's
Thanks! Seems to be a duplicate of #605, but i like the more explicit solution here better. The thing is, we don't know whether it's a bug in django-compressor or the external libraries... Now that two libraries do this (django-page-cms and sorl-thumbnail), that hints it's django-compressor's problem, but I'm still not sure. I opened batiste/django-page-cms#170, maybe django-page-cms' maintainer can help.
Also, we'd need a test to merge this...
According to Django https://github.com/django/django/blob/master/django/template/base.py#L894
Any Node instance should have a child_nodelist (at least a class level attribute, this is a bit confusing there)
ForNode and IfNode also have this attribute.
Anyway what is the error there?
What is not iterable? is it what self.get_nodelist(node, original, context) return or getattr(node) expect .an iterable? What is the type of the node right there?