diff --git a/django_extensions/management/commands/show_urls.py b/django_extensions/management/commands/show_urls.py index ea002d2f8..5e8eec931 100644 --- a/django_extensions/management/commands/show_urls.py +++ b/django_extensions/management/commands/show_urls.py @@ -121,9 +121,9 @@ def handle(self, *args, **options): raise CommandError("Error occurred while trying to load %s: %s" % (getattr(settings, urlconf), str(e))) view_functions = self.extract_views_from_urlpatterns(urlconf.urlpatterns) - for (func, regex, url_name, *deprecated) in view_functions: - if deprecated: - deprecated = deprecated[0] + for (func, regex, url_name, *dep_status) in view_functions: + if dep_status: + deprecated = bool(dep_status[0]) else: deprecated = False