Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use enumeration to provide history input index names #4700

Merged
merged 1 commit into from Sep 26, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 4 additions & 4 deletions lib/galaxy/webapps/galaxy/controllers/history.py
Expand Up @@ -1257,16 +1257,16 @@ def rename(self, trans, payload=None, **kwd):
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)
Expand Down