Skip to content

Commit

Permalink
render hooks; do not try to run empty hook statements
Browse files Browse the repository at this point in the history
  • Loading branch information
drewbanin committed Sep 3, 2019
1 parent ec5a19c commit 7b7c13f
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,12 @@
commit;
{% endcall %}
{% endif %}
{% call statement(auto_begin=inside_transaction) %}
{{ hook.get('sql') }}
{% endcall %}
{% set rendered = render(hook.get('sql')) | trim %}
{% if (rendered | length) > 0 %}
{% call statement(auto_begin=inside_transaction) %}
{{ render(hook.get('sql')) }}
{% endcall %}
{% endif %}
{% endfor %}
{% endmacro %}

Expand Down

0 comments on commit 7b7c13f

Please sign in to comment.