~netlandish/django-wiki

960bb413f2c00759e21dcf09e5ec359e6358d0ef — Benjamin Bach 6 years ago 85bf407 + 5f019da
Merge pull request #849 from atombrella/unused_variable

Deleted a redundant initialization in wiki.decorators.get_article.
1 files changed, 1 insertions(+), 6 deletions(-)

M src/wiki/decorators.py
M src/wiki/decorators.py => src/wiki/decorators.py +1 -6
@@ 63,8 63,6 @@ def get_article(func=None, can_read=True, can_write=False,  # noqa
        path = kwargs.pop('path', None)
        article_id = kwargs.pop('article_id', None)

        urlpath = None

        # fetch by urlpath.path
        if path is not None:
            try:


@@ 99,10 97,7 @@ def get_article(func=None, can_read=True, can_write=False,  # noqa
            else:
                # Be robust: Somehow article is gone but urlpath exists...
                # clean up
                return_url = reverse(
                    'wiki:get',
                    kwargs={
                        'path': urlpath.parent.path})
                return_url = reverse('wiki:get', kwargs={'path': urlpath.parent.path})
                urlpath.delete()
                return HttpResponseRedirect(return_url)