summaryrefslogtreecommitdiff
path: root/django
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2017-03-03 10:52:20 -0500
committerGitHub <noreply@github.com>2017-03-03 10:52:20 -0500
commitb23d264046db1c8f58a174b9be27ee760341ba06 (patch)
tree945be8a8f543755d2fc249e1861f2fea425f627b /django
parent6b47431aaf5222b687791f92f352413a16fc62cd (diff)
Fixed #27887 -- Fixed URLs check crash with namespaced URLs inside non-namespaced URLs.
Diffstat (limited to 'django')
-rw-r--r--django/core/checks/urls.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/django/core/checks/urls.py b/django/core/checks/urls.py
index 13c7e2b08b..0f65d3f3b7 100644
--- a/django/core/checks/urls.py
+++ b/django/core/checks/urls.py
@@ -60,7 +60,10 @@ def _load_all_namespaces(resolver, parents=()):
if getattr(url, 'namespace', None) is not None
]
for pattern in url_patterns:
- current = parents + (getattr(pattern, 'namespace', ()),)
+ namespace = getattr(pattern, 'namespace', None)
+ current = parents
+ if namespace is not None:
+ current += (namespace,)
namespaces.extend(_load_all_namespaces(pattern, current))
return namespaces