From cec11a3336c730e6dc2f1966fee749cc830e97c0 Mon Sep 17 00:00:00 2001 From: Tim Graham Date: Thu, 10 Oct 2013 09:35:56 -0400 Subject: Used "is" for comparisons with None. --- django/forms/widgets.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'django/forms') diff --git a/django/forms/widgets.py b/django/forms/widgets.py index f8320117f7..678b963e7e 100644 --- a/django/forms/widgets.py +++ b/django/forms/widgets.py @@ -508,7 +508,7 @@ class Select(Widget): return mark_safe('\n'.join(output)) def render_option(self, selected_choices, option_value, option_label): - if option_value == None: + if option_value is None: option_value = '' option_value = force_text(option_value) if option_value in selected_choices: -- cgit v1.3