﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
26821	EmailField/URLField.clean(None) crashes	VINAY KUMAR SHARMA	Priy Werry	"Getting this error on admin form save.

Reason, have not any None check at: [https://github.com/django/django/blob/master/django/forms/fields.py#L700]

Must should be check:
{{{
value = self.to_python(value)
if value:
    value = value.strip()
}}}

Error Report:
{{{
...
Django Version:	1.11.dev20160629191130
Exception Location:	/opt/django-trunk/django/forms/fields.py in clean, line 700
Python Version:	3.5.1
...
}}}

The below commit caused the error:

[https://github.com/django/django/commit/267dc4adddd2882182f71a7f285a06b1d4b15af0#diff-d7e069df501fd643847061cbdb376670]

Before that at line 230 it was returning empty string, but after it is returning None.



"	Bug	closed	Forms	dev	Normal	fixed	error,form fields, strip		Ready for checkin	1	0	0	0	0	0
