mirror of
https://github.com/django-components/django-components.git
synced 2025-07-14 04:14:58 +00:00
Fix bug where template with multiple component_block tags could raise KeyError (#19)
Co-authored-by: rbeard0330 <@dul2k3BKW6m>
This commit is contained in:
parent
ed3f3125da
commit
979dc82eda
3 changed files with 55 additions and 6 deletions
|
@ -45,7 +45,7 @@ class Component(with_metaclass(MediaDefiningClass)):
|
|||
return NodeList(node for node in template.template.nodelist if is_slot_node(node))
|
||||
|
||||
def render(self, context, slots_filled=None):
|
||||
slots_filled = slots_filled or []
|
||||
slots_filled = slots_filled or {}
|
||||
template = get_template(self.template(context))
|
||||
slots_in_template = self.slots_in_template(template)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue