From 2f8210c5dcfda7bd9202434d40609e73564bca3b Mon Sep 17 00:00:00 2001 From: Eric Beahan Date: Fri, 5 Jun 2020 09:40:54 -0500 Subject: [PATCH] add additional handling logic to template decorator --- scripts/generators/asciidoc_fields.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/generators/asciidoc_fields.py b/scripts/generators/asciidoc_fields.py index 605ec219fd..381157c78e 100644 --- a/scripts/generators/asciidoc_fields.py +++ b/scripts/generators/asciidoc_fields.py @@ -28,6 +28,10 @@ def decorator(func): @wraps(func) def decorated_function(*args, **kwargs): ctx = func(*args, **kwargs) + if ctx is None: + ctx = {} + elif not isinstance(ctx, dict): + return ctx return render_template(template_name, **ctx) return decorated_function return decorator