Skip to content

Commit

Permalink
Build nested tool state only once
Browse files Browse the repository at this point in the history
  • Loading branch information
mvdbeek committed Apr 4, 2024
1 parent 2ca4b2e commit 89def45
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/galaxy/tools/parameters/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -518,8 +518,9 @@ def populate_state(
def _populate_state_legacy(
request_context, inputs, incoming, state, errors, prefix="", context=None, check=True, simple_errors=True
):
nested_state = flat_to_nested_state(incoming)
context = ExpressionContext(state, nested_state)
if context is None:
context = flat_to_nested_state(incoming)
context = ExpressionContext(state, context)
for input in inputs.values():
state[input.name] = input.get_initial_value(request_context, context)
key = prefix + input.name
Expand Down

0 comments on commit 89def45

Please sign in to comment.