Commit e1720911 authored by Paul Brown's avatar Paul Brown

improve error message when resolve_ctx is missing

parent 0724f0ec
...@@ -173,7 +173,11 @@ class Macro(BaseRule): ...@@ -173,7 +173,11 @@ class Macro(BaseRule):
""" """
parts = name.split('.') parts = name.split('.')
field = context.resolve(parts[0]) try:
field = context.resolve(parts[0])
except AttributeError:
raise Exception('Your template is missing '
'"{% set render_ctx = h.resolve_ctx() %}"')
if not field: if not field:
return None return None
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment