Skip to content

Commit

Permalink
Merge pull request #64 from edx/aed/fix-reverse
Browse files Browse the repository at this point in the history
Make reverse() resilient to 0-length args.
  • Loading branch information
mattcarter authored Sep 15, 2020
2 parents be123df + 13d9617 commit 9ce592d
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 9ce592d

Please sign in to comment.