chore: mass trailing whitespace and EOF fixes

This commit is contained in:
Ankush Menat
2021-08-19 13:41:10 +05:30
parent 869e36c33a
commit 4551d7d602
1190 changed files with 1352 additions and 1604 deletions

View File

@@ -96,6 +96,6 @@
.search-container {
margin-top: 1.2rem;
max-width: 500px;
}
}
</style>
{%- endblock -%}

View File

@@ -8,7 +8,7 @@ def get_context(context):
context.greeting_title = setting.greeting_title
context.greeting_subtitle = setting.greeting_subtitle
# Support content
favorite_articles = get_favorite_articles_by_page_view()
if len(favorite_articles) < 6:
@@ -16,15 +16,15 @@ def get_context(context):
if favorite_articles:
for article in favorite_articles:
name_list.append(article.name)
for record in (frappe.get_all("Help Article",
fields=["title", "content", "route", "category"],
filters={"name": ['not in', tuple(name_list)], "published": 1},
for record in (frappe.get_all("Help Article",
fields=["title", "content", "route", "category"],
filters={"name": ['not in', tuple(name_list)], "published": 1},
order_by="creation desc", limit=(6-len(favorite_articles)))):
favorite_articles.append(record)
context.favorite_article_list = get_favorite_articles(favorite_articles)
context.help_article_list = get_help_article_list()
def get_favorite_articles_by_page_view():
return frappe.db.sql(
"""
@@ -34,13 +34,13 @@ def get_favorite_articles_by_page_view():
t1.content as content,
t1.route as route,
t1.category as category,
count(t1.route) as count
FROM `tabHelp Article` AS t1
count(t1.route) as count
FROM `tabHelp Article` AS t1
INNER JOIN
`tabWeb Page View` AS t2
ON t1.route = t2.path
`tabWeb Page View` AS t2
ON t1.route = t2.path
WHERE t1.published = 1
GROUP BY route
GROUP BY route
ORDER BY count DESC
LIMIT 6;
""", as_dict=True)
@@ -71,4 +71,4 @@ def get_help_article_list():
'articles': help_articles,
}
help_article_list.append(help_aricles_per_caetgory)
return help_article_list
return help_article_list