mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-10-31 02:28:09 +08:00
``Repeat.get_initial_value`` passed the parent ``context`` directly to
each child input's ``get_initial_value``, so siblings within a repeat
instance were invisible to each other's ``dynamic_options`` lookups.
``Section`` and ``Conditional`` already wrap their partial ``rval`` in
a child ``ExpressionContext`` for this reason — bring ``Repeat`` in
line.
Surfaced by ``data_manager_manual`` (``min=1`` on both the outer
``data_tables`` repeat and the inner ``columns`` repeat). The inner
``data_table_column_name`` select declares::
dynamic_options="galaxy_code_get_available_data_table_columns(
__trans__, data_table_name)"
During the initial ``populate_state`` pass ``Repeat.get_initial_value``
built the default ``data_tables`` instance with the outer
``rval_dict`` only visible as a local variable; the recursive
``columns.get_initial_value`` call therefore saw a context that did
not contain ``data_table_name`` and the eval raised::
NameError: name 'data_table_name' is not defined
The error is caught at ``basic.py`` (logged at DEBUG, options returned
as ``[]``) and the default instance is later discarded by
``_populate_state_legacy`` which rebuilds the state with a proper
child context — so the tool ran fine, but every form build polluted
the log.