Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
documentation: Rename `article_path` variable when getting context.
Lauryn Menard8859da911b5e
diff --git a/zerver/views/documentation.py b/zerver/views/documentation.pyindex 448e3ea4ece..8a6903efb6c 100644--- a/zerver/views/documentation.py+++ b/zerver/views/documentation.py@@ -154,14 +154,14 @@ class MarkdownDirectoryView(ApiURLView):documentation_article.article_path):# Absolute path case- article_path = documentation_article.article_path+ article_absolute_path = documentation_article.article_pathelif documentation_article.article_path.startswith("/"):# Hack: `context["article"] has a leading `/`, so we use + to add directories.- article_path = (+ article_absolute_path = (os.path.join(settings.DEPLOY_ROOT, "templates") + documentation_article.article_path)else:- article_path = os.path.join(+ article_absolute_path = os.path.join(settings.DEPLOY_ROOT, "templates", documentation_article.article_path)@@ -190,8 +190,8 @@ class MarkdownDirectoryView(ApiURLView):# The following is a somewhat hacky approach to extract titles from articles.endpoint_name = Noneendpoint_method = None- if os.path.exists(article_path):- with open(article_path) as article_file:+ if os.path.exists(article_absolute_path):+ with open(article_absolute_path) as article_file:first_line = article_file.readlines()[0]# Strip the header and then use the first line to get the article titleif context["article"] == "/zerver/api/api-doc-template.md":