1
0
mirror of https://github.com/django/django.git synced 2025-10-31 01:25:32 +00:00

Used "is" for comparisons with None.

This commit is contained in:
Tim Graham
2013-10-10 09:35:56 -04:00
parent ff9e8eccf8
commit cec11a3336
8 changed files with 17 additions and 16 deletions

View File

@@ -315,7 +315,7 @@ class RegroupNode(Node):
def render(self, context):
obj_list = self.target.resolve(context, True)
if obj_list == None:
if obj_list is None:
# target variable wasn't found in context; fail silently.
context[self.var_name] = []
return ''