Skip to content

Commit 1840922

Browse files
authored
Use initial value for default dashboard template name (#11298)
1 parent 36bc94a commit 1840922

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

readthedocs/projects/views/private.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ def get_context_data(self, **kwargs):
116116

117117
projects = AdminPermission.projects(user=self.request.user, admin=True)
118118
n_projects = projects.count()
119+
template_name = "security-logs.html"
119120
if n_projects < 3 and (timezone.now() - projects.first().pub_date).days < 7:
120121
template_name = "example-projects.html"
121122
elif (
@@ -128,8 +129,6 @@ def get_context_data(self, **kwargs):
128129
and not projects.filter(addons__analytics_enabled=True).exists()
129130
):
130131
template_name = "traffic-analytics.html"
131-
else:
132-
context["promotion"] = "security-logs.html"
133132

134133
context["promotion"] = f"projects/partials/dashboard/{template_name}"
135134

0 commit comments

Comments
 (0)