From b893e579619a29811d0a709d34e5decda2ca1bf7 Mon Sep 17 00:00:00 2001 From: guerler Date: Tue, 26 Sep 2017 13:52:03 -0400 Subject: [PATCH] Use enumeration to provide history input index names --- lib/galaxy/webapps/galaxy/controllers/history.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/galaxy/webapps/galaxy/controllers/history.py b/lib/galaxy/webapps/galaxy/controllers/history.py index 2fc4e84e424..11b3ff927a1 100644 --- a/lib/galaxy/webapps/galaxy/controllers/history.py +++ b/lib/galaxy/webapps/galaxy/controllers/history.py @@ -1257,16 +1257,16 @@ class HistoryController(BaseUIController, SharableMixin, UsesAnnotations, UsesIt return { 'title' : 'Change history name(s)', 'inputs' : [{ - 'name' : trans.security.encode_id(h.id), + 'name' : 'name_%i' % i, 'label' : 'Current: %s' % h.name, 'value' : h.name - } for h in histories] + } for i, h in enumerate(histories)] } else: messages = [] - for h in histories: + for i, h in enumerate(histories): cur_name = h.get_display_name() - new_name = payload.get(trans.security.encode_id(h.id)) + new_name = payload.get('name_%i' % i) # validate name is empty if not isinstance(new_name, string_types) or not new_name.strip(): messages.append('You must specify a valid name for History \'%s\'.' % cur_name)