From f3d3338e06d571a529bb2046428eeac8e56bcbf6 Mon Sep 17 00:00:00 2001 From: Hasan Ramezani Date: Wed, 10 Oct 2018 02:50:00 +0200 Subject: [PATCH] Fixed #29829 -- Remove unused code in contrib.sites.models._simple_domain_name_validator(). --- django/contrib/sites/models.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/django/contrib/sites/models.py b/django/contrib/sites/models.py index 19f52e4487..4e6d3df17a 100644 --- a/django/contrib/sites/models.py +++ b/django/contrib/sites/models.py @@ -14,8 +14,6 @@ def _simple_domain_name_validator(value): Validate that the given value contains no whitespaces to prevent common typos. """ - if not value: - return checks = ((s in value) for s in string.whitespace) if any(checks): raise ValidationError(