Commit 94492aaf authored by Serge S. Koval's avatar Serge S. Koval

Merge pull request #1067 from pawl/better_error_resolve

improve error message when resolve_ctx is missing
parents 068c6606 e1720911
...@@ -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