diff options
| author | Tim Graham <timograham@gmail.com> | 2017-10-05 11:38:39 -0400 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2017-10-12 16:46:31 -0400 |
| commit | df0aebc893973c78d7d2cda712ba4133dbe29b6e (patch) | |
| tree | 7246224e317eba76166820aff768663624b455fb | |
| parent | cf59392e16064d5d0e67d5d70e8047f27ccb858e (diff) | |
Simplified IfNode.nodelist
| -rw-r--r-- | django/template/defaulttags.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/django/template/defaulttags.py b/django/template/defaulttags.py index 9c7d941126..1101c20003 100644 --- a/django/template/defaulttags.py +++ b/django/template/defaulttags.py @@ -292,7 +292,7 @@ class IfNode(Node): @property def nodelist(self): - return NodeList(node for _, nodelist in self.conditions_nodelists for node in nodelist) + return NodeList(iter(self)) def render(self, context): for condition, nodelist in self.conditions_nodelists: |
