fix: use get_list for permission-aware article category queries

Restores the knowledge base API change from #3502 (reverted in #3512):
get_list enforces user permissions where get_all bypasses them.
This commit is contained in:
Ritvik Sardana
2026-06-29 15:13:27 +05:30
parent 4302b68058
commit 2986f93530
+2 -2
View File
@@ -88,7 +88,7 @@ def move_to_category(category: str, articles: list[str]):
@frappe.whitelist()
def get_categories():
categories = frappe.get_all(
categories = frappe.get_list(
"HD Article Category",
fields=["name", "category_name", "modified"],
)
@@ -104,7 +104,7 @@ def get_categories():
@frappe.whitelist()
def get_category_articles(category: str):
articles = frappe.get_all(
articles = frappe.get_list(
"HD Article",
filters={"category": category, "status": "Published"},
fields=["name", "title", "published_on", "modified", "author", "content"],