Skip to content

Commit

Permalink
Make reverse() resilient to 0-length args.
Browse files Browse the repository at this point in the history
  • Loading branch information
iloveagent57 committed Sep 15, 2020
1 parent be123df commit 13d9617
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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="[email protected]",
description=("A wiki system written for the Django framework."),
Expand Down
2 changes: 1 addition & 1 deletion wiki/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 13d9617

Please sign in to comment.