1
0
mirror of https://github.com/django/django.git synced 2025-11-07 07:15:35 +00:00

Fixed #28795 -- Removed 'not in' checks and used dict.setdefault().

This commit is contained in:
Дилян Палаузов
2017-11-13 16:15:49 -05:00
committed by Tim Graham
parent a2ec1e6b2d
commit 23bf4ad87f
13 changed files with 27 additions and 60 deletions

View File

@@ -225,8 +225,7 @@ class IfChangedNode(Node):
def render(self, context):
# Init state storage
state_frame = self._get_context_stack_frame(context)
if self not in state_frame:
state_frame[self] = None
state_frame.setdefault(self)
nodelist_true_output = None
if self._varlist: