Commit 9dac56e8 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 7ca76b9b
......@@ -8,7 +8,7 @@
{# jref_of_shared returns original reference used to request shared instance.
it is extracted from slave_reference who is composed as `partition_id`+'_'+`reference` #}
it is extracted from slave_reference which is composed as `partition_id`+'_'+`reference` #}
{%- macro jref_of_shared(slave) %}
{%- set ref = slave['slave_reference'] %}
{%- set partition_id %}{{partition_id}}{%- endset %}
......@@ -41,9 +41,8 @@
{# verify that there is no dangling ru_ref and ruincell_ref #} XXX + resolve those ru*_ref
{# jcell_ru_ref returns RU reference for a cell.
if the cell embeds RU definition, its reference comes as `_<cell_ref>_ru`.
return value is json-encoded to workaround jinja2 macro-ret limitation. #}
{# jcell_ru_ref returns RU reference linked from a cell.
if the cell embeds RU definition, its reference comes as `_<cell_ref>_ru`. #}
# XXX cycle protection
{%- macro jcell_ru_ref(cell) %}
{%- set ru = cell['ru'] %}
......@@ -53,8 +52,8 @@
{{ jcell_ru_ref(ru['ruincell_ref']) }}
{%- else %}
{# ru definition is embedded into cell #}
{{ J(jref_of_shared(cell))
{{ ('_%s_ru' % J(jref_of_shared(cell))) | tojson }}
{%- endif %}
{%- endmacro %}
......
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