Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

documentation: Avoid potential unused variable code path.

Tim Abbott1c180a9f5715
diff --git a/zerver/views/documentation.py b/zerver/views/documentation.py
index 701eb7acc77..8bc95b94887 100644
--- a/zerver/views/documentation.py
+++ b/zerver/views/documentation.py
@@ -145,6 +145,8 @@ class MarkdownDirectoryView(ApiURLView):
# The following is a somewhat hacky approach to extract titles from articles.
# Hack: `context["article"] has a leading `/`, so we use + to add directories.
article_path = os.path.join(settings.DEPLOY_ROOT, "templates") + context["article"]
+ endpoint_name = None
+ endpoint_method = None
if os.path.exists(article_path):
with open(article_path) as article_file:
first_line = article_file.readlines()[0]