Skip to content

Commit

Permalink
Fix push list handler
Browse files Browse the repository at this point in the history
  • Loading branch information
guerler committed Dec 6, 2017
1 parent c6fc1a8 commit b6e5209
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions lib/galaxy/webapps/tool_shed/controllers/repository.py
Expand Up @@ -19,7 +19,7 @@
web
)
from galaxy.web.base.controller import BaseUIController
from galaxy.web.form_builder import CheckboxField
from galaxy.web.form_builder import CheckboxField, SelectField
from galaxy.web.framework.helpers import grids
from galaxy.webapps.tool_shed.util import ratings_util
from tool_shed.capsule import capsule_manager
Expand Down Expand Up @@ -1934,18 +1934,15 @@ def manage_repository(self, trans, id, **kwd):
current_allow_push_list = []
options = []
for user in trans.sa_session.query(trans.model.User):
if user.username not in current_push_list:
if user.username not in current_allow_push_list:
options.append(user)
allow_push_select_field = SelectField(name='allow_push',
multiple=True,
display=display,
value=selected_value)
for obj in objs:
value='none')
for obj in current_allow_push_list:
label = getattr(obj, 'username')
if str(selected_value) == str(obj.id) or str(selected_value) == trans.security.encode_id(obj.id):
allow_push_select_field.add_option(label, trans.security.encode_id(obj.id), selected=True)
else:
allow_push_select_field.add_option(label, trans.security.encode_id(obj.id))
allow_push_select_field.add_option(label, trans.security.encode_id(obj.id))
checked = alerts_checked or user.email in email_alerts
alerts_check_box = CheckboxField('alerts', value=checked)
changeset_revision_select_field = grids_util.build_changeset_revision_select_field(trans,
Expand Down

0 comments on commit b6e5209

Please sign in to comment.