mirror of
https://github.com/django/django.git
synced 2025-07-25 14:14:13 +00:00
Used "is" for comparisons with None.
This commit is contained in:
parent
ff9e8eccf8
commit
cec11a3336
8 changed files with 17 additions and 16 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue