1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/commits/0a6c263dd428/ Changeset: 0a6c263dd428 User: greg Date: 2013-07-11 21:16:08 Summary: Fix for generating the repository type select list, and fix a related typo in my last commit. Affected #: 2 files diff -r 5a41d725197d2d42475f80282a57b0b364898671 -r 0a6c263dd4284d3aed1b59db91c16ca5e4c4a7a0 lib/galaxy/webapps/tool_shed/controllers/repository.py --- a/lib/galaxy/webapps/tool_shed/controllers/repository.py +++ b/lib/galaxy/webapps/tool_shed/controllers/repository.py @@ -666,7 +666,7 @@ # Update repository files for browsing. suc.update_repository( repo ) metadata = self.get_metadata( trans, id, repository.tip( trans.app ) ) - repository_type_select_field = rt_util.build_repository_type_select_fiels( trans, repository=repository ) + repository_type_select_field = rt_util.build_repository_type_select_field( trans, repository=repository ) return trans.fill_template( '/webapps/tool_shed/repository/browse_repository.mako', repository=repository, metadata=metadata, @@ -1017,7 +1017,7 @@ action='view_repository', message=message, id=trans.security.encode_id( repository.id ) ) ) - repository_type_select_field = rt_util.build_repository_type_select_fiels( trans ) + repository_type_select_field = rt_util.build_repository_type_select_field( trans ) return trans.fill_template( '/webapps/tool_shed/repository/create_repository.mako', name=name, description=description, @@ -2185,7 +2185,7 @@ else: message += malicious_error status = 'error' - repository_type_select_field = rt_util.build_repository_type_select_fiels( trans, repository=repository ) + repository_type_select_field = rt_util.build_repository_type_select_field( trans, repository=repository ) malicious_check_box = CheckboxField( 'malicious', checked=is_malicious ) skip_tool_tests_check_box = CheckboxField( 'skip_tool_tests', checked=skip_tool_tests_checked ) categories = suc.get_categories( trans ) @@ -2365,7 +2365,7 @@ display_reviews = util.string_as_bool( kwd.get( 'display_reviews', False ) ) rra = self.get_user_item_rating( trans.sa_session, trans.user, repository, webapp_model=trans.model ) metadata = self.get_metadata( trans, id, repository.tip( trans.app ) ) - repository_type_select_field = rt_util.build_repository_type_select_fiels( trans, repository=repository ) + repository_type_select_field = rt_util.build_repository_type_select_field( trans, repository=repository ) return trans.fill_template( '/webapps/tool_shed/repository/rate_repository.mako', repository=repository, metadata=metadata, @@ -2565,7 +2565,7 @@ else: message = "Select at least 1 file to delete from the repository before clicking <b>Delete selected files</b>." status = "error" - repository_type_select_field = rt_util.build_repository_type_select_fiels( trans, repository=repository ) + repository_type_select_field = rt_util.build_repository_type_select_field( trans, repository=repository ) return trans.fill_template( '/webapps/tool_shed/repository/browse_repository.mako', repo=repo, repository=repository, @@ -2991,7 +2991,7 @@ message += malicious_error status = 'error' containers_dict = container_util.build_repository_containers_for_tool_shed( trans, repository, changeset_revision, repository_dependencies, repository_metadata ) - repository_type_select_field = rt_util.build_repository_type_select_fiels( trans, repository=repository ) + repository_type_select_field = rt_util.build_repository_type_select_field( trans, repository=repository ) return trans.fill_template( '/webapps/tool_shed/repository/view_repository.mako', repo=repo, repository=repository, diff -r 5a41d725197d2d42475f80282a57b0b364898671 -r 0a6c263dd4284d3aed1b59db91c16ca5e4c4a7a0 lib/tool_shed/repository_types/util.py --- a/lib/tool_shed/repository_types/util.py +++ b/lib/tool_shed/repository_types/util.py @@ -8,13 +8,13 @@ types = [ GENERIC, TOOL_DEPENDENCY_DEFINITION ] -def build_repository_type_select_fiels( trans, repository=None, name='repository_type' ): +def build_repository_type_select_field( trans, repository=None, name='repository_type' ): """Called from the Tool Shed to generate the current list of supported repository types.""" if repository: selected_type = str( repository.type ) else: selected_type = None - repository_type_select_fiels = SelectField( name=name ) + repository_type_select_field = SelectField( name=name ) for type_label, type_class in trans.app.repository_types_registry.repository_types_by_label.items(): option_label = str( type_class.label ) option_value = str( type_class.type ) @@ -23,8 +23,10 @@ else: selected = False if repository: - if type_class.is_valid_for_type( trans.app, repository ): - repository_type_select_fiels.add_option( option_label, option_value, selected=selected ) + if repository.type == option_value: + repository_type_select_field.add_option( option_label, option_value, selected=selected ) + elif type_class.is_valid_for_type( trans.app, repository ): + repository_type_select_field.add_option( option_label, option_value, selected=selected ) else: - repository_type_select_fiels.add_option( option_label, option_value, selected=selected ) - return repository_type_select_fiels + repository_type_select_field.add_option( option_label, option_value, selected=selected ) + return repository_type_select_field Repository URL: https://bitbucket.org/galaxy/galaxy-central/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email.