From 9bd6c95b3f8d9ab0412699cf7c78a828bda561d9 Mon Sep 17 00:00:00 2001 From: Ankush Menat Date: Tue, 14 Jan 2025 18:52:50 +0530 Subject: [PATCH] perf: don't yaml-parse empty string and get nothing back *surprise* --- frappe/website/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frappe/website/utils.py b/frappe/website/utils.py index e8587f551f..94a923729e 100644 --- a/frappe/website/utils.py +++ b/frappe/website/utils.py @@ -423,7 +423,7 @@ def get_frontmatter(string): body = result.group(2) return { - "attributes": yaml.safe_load(frontmatter), + "attributes": yaml.safe_load(frontmatter) if frontmatter else "", "body": body, }