mirror of
https://github.com/django-components/django-components.git
synced 2025-09-25 23:19:11 +00:00
test: test to illustrate bug in component caching when using include tag (#1135)
* test: test to illustrate bug in component caching when using include tag * fix: add cleanup for render context in component rendering * refactor: clarify cleanup comment in component rendering logic * refactor: fix linter errors * test: formatting and unnecessary test setup --------- Co-authored-by: Juro Oravec <juraj.oravec.josefson@gmail.com>
This commit is contained in:
parent
eed15d32ab
commit
e0b718c314
4 changed files with 34 additions and 1 deletions
|
@ -1306,6 +1306,8 @@ class Component(
|
|||
# The component rendering was short-circuited by an extension, skipping
|
||||
# the rest of the rendering process. This may be for example a cached content.
|
||||
if result_override is not None:
|
||||
# Cleanup needs to be done even if short-circuited
|
||||
context.render_context.pop()
|
||||
return result_override
|
||||
|
||||
# We pass down the components the info about the component's parent.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue