From 13d9617afe3fb77000acbf8b46254e9d69810246 Mon Sep 17 00:00:00 2001 From: Alex Dusenbery Date: Tue, 15 Sep 2020 11:56:38 -0400 Subject: [PATCH] Make reverse() resilient to 0-length args. --- setup.py | 2 +- wiki/models/__init__.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 4072b9409..b550659ca 100644 --- a/setup.py +++ b/setup.py @@ -62,7 +62,7 @@ def is_requirement(line): setup( name="django-wiki", - version="0.1.0", + version="0.1.1", author="Benjamin Bach", author_email="benjamin@overtag.dk", description=("A wiki system written for the Django framework."), diff --git a/wiki/models/__init__.py b/wiki/models/__init__.py index b18f349d5..a3e127ac3 100644 --- a/wiki/models/__init__.py +++ b/wiki/models/__init__.py @@ -75,7 +75,7 @@ def reverse(*args, **kwargs): return the result of calling reverse._transform_url(reversed_url) for every url in the wiki namespace. """ - if isinstance(args[0], string_types) and args[0].startswith('wiki:'): + if args and isinstance(args[0], string_types) and args[0].startswith('wiki:'): url_kwargs = kwargs.get('kwargs', {}) path = url_kwargs.get('path', False) # If a path is supplied then discard the article_id