From 6e24b0daf93e02227694dec8bcd44544c98e7458 Mon Sep 17 00:00:00 2001 From: Trenton H <797416+stumpylog@users.noreply.github.com> Date: Tue, 15 Oct 2024 07:34:21 -0700 Subject: [PATCH] Don't return a None value, so we'll use default if set --- src/documents/templating/filepath.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/documents/templating/filepath.py b/src/documents/templating/filepath.py index 92bc94217..afb43ff4d 100644 --- a/src/documents/templating/filepath.py +++ b/src/documents/templating/filepath.py @@ -82,7 +82,7 @@ def get_cf_value( name: str, default: str | None = None, ) -> str | None: - if name in custom_field_data: + if name in custom_field_data and custom_field_data[name]["value"] is not None: return custom_field_data[name]["value"] elif default is not None: return default