From bb9a1928cafc2a25afe867ef2848c0c74171ad98 Mon Sep 17 00:00:00 2001 From: Gustavo Andres Morero Date: Wed, 5 Apr 2017 15:52:53 -0300 Subject: [PATCH] adding exception for get_by_path call on links plugin. --- wiki/plugins/links/mdx/djangowikilinks.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/wiki/plugins/links/mdx/djangowikilinks.py b/wiki/plugins/links/mdx/djangowikilinks.py index ff49735f..2a080b2d 100755 --- a/wiki/plugins/links/mdx/djangowikilinks.py +++ b/wiki/plugins/links/mdx/djangowikilinks.py @@ -93,6 +93,11 @@ class WikiPath(markdown.inlinepatterns.Pattern): path = urlpath.get_absolute_url() except models.URLPath.DoesNotExist: pass + except TypeError: + # since we can't get request organization here, + # TypeError will be raised here + # it doesn't affect functionality + pass else: urlpath = models.URLPath.objects.get(article=self.markdown.article) source_components = urlpath.path.strip("/").split("/") -- 2.45.2