From 4c4189c5581849aa6db131f4e5e3e4d7f37612d1 Mon Sep 17 00:00:00 2001 From: John Chilton Date: Thu, 21 Nov 2013 20:18:47 -0600 Subject: [PATCH] Fix API handling of tools containing repeat statement with min set. --- lib/galaxy/tools/__init__.py | 1 + test/functional/tools/min_repeat.xml | 27 +++++++++++++++++++++ test/functional/tools/samples_tool_conf.xml | 1 + 3 files changed, 29 insertions(+) create mode 100644 test/functional/tools/min_repeat.xml diff --git a/lib/galaxy/tools/__init__.py b/lib/galaxy/tools/__init__.py index 3125ceab227..52c4bed2a81 100755 --- a/lib/galaxy/tools/__init__.py +++ b/lib/galaxy/tools/__init__.py @@ -1982,6 +1982,7 @@ class Tool( object, Dictifiable ): group_errors = [ ] any_group_errors = False rep_index = 0 + del group_state[:] # Clear prepopulated defaults if repeat.min set. while True: rep_name = "%s_%d" % ( key, rep_index ) if not any( [ incoming_key.startswith(rep_name) for incoming_key in incoming.keys() ] ): diff --git a/test/functional/tools/min_repeat.xml b/test/functional/tools/min_repeat.xml new file mode 100644 index 00000000000..495c3834e9e --- /dev/null +++ b/test/functional/tools/min_repeat.xml @@ -0,0 +1,27 @@ + + + cat #for $q in $queries# ${q.input} #end for# > $out_file1 ; + cat #for $q in $queries2# ${q.input2} #end for# > $out_file2 + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test/functional/tools/samples_tool_conf.xml b/test/functional/tools/samples_tool_conf.xml index 154f33506ae..7181a42c5ad 100644 --- a/test/functional/tools/samples_tool_conf.xml +++ b/test/functional/tools/samples_tool_conf.xml @@ -12,4 +12,5 @@ + \ No newline at end of file