Closed mliudev closed 6 years ago
But if instance.glossary.get('render_template')
returns None
, then the or ''
-clause should catch it. Are you sure this is causing your problem?
@jrief I'm sorry I copied my locally edited version of the code when I pasted this. I've fixed the comment to reflect what's actually in the repo in this line: https://github.com/awesto/django-shop/blob/0.11.4/shop/cascade/catalog.py#L66. Note that passing ''
will also create a TemplateNotFound exception.
@mliudev Thanks for reporting. This will be fixed in 0.11.6
Thanks!
This is the offending piece of code on line 66 of 'cascade/catalog.py':
If the instance doesn't have a template in its glossary then
None
is passed toselect_template(...)
which causes a 500 ISE with the following traceback:None
should not be passedselect_template(...)
.I think the fix here is to create the list before sending it to
select_template(...)
without any references toNone
. I can make a PR if this sounds correct. This problem currently affects version 0.11.4 and up.