miracle2k / django-assets

Django webassets integration.
BSD 2-Clause "Simplified" License
89 stars 79 forks source link

Iterate over nodes and templates using nodelist #105

Open lvoytek opened 1 year ago

lvoytek commented 1 year ago

When iterating over Template and Node objects directly, nodes may fail with an exception such as: TypeError: 'TextNode' object is not iterable This is due to iterating over nodes being unsupported in Django, as noted in https://code.djangoproject.com/ticket/7430 To avoid this error, explicitly iterate over the nodelist attribute, rather than relying on iter.

This fixes the issue seen in #101