Merge pull request #7201 from mvdbeek/fix_view_metadata_error

[18.09] Fix error in view_tool_metadata
This commit is contained in:
Dannon
2019-01-11 09:19:39 -05:00
committed by GitHub
2 changed files with 6 additions and 6 deletions
@@ -880,8 +880,8 @@ class RepositoryController(BaseUIController, ratings_util.ItemRatings):
with ValidationContext.from_app(trans.app) as validation_context:
tv = tool_validator.ToolValidator(validation_context)
repository, tool, valid, message = tv.load_tool_from_changeset_revision(repository_id,
changeset_revision,
tool_config)
changeset_revision,
tool_config)
if message or not valid:
status = 'error'
tool_state = tool_util.new_state(trans, tool, invalid=not valid)
@@ -1772,8 +1772,8 @@ class RepositoryController(BaseUIController, ratings_util.ItemRatings):
with ValidationContext.from_app(trans.app) as validation_context:
tv = tool_validator.ToolValidator(validation_context)
repository, tool, valid, error_message = tv.load_tool_from_changeset_revision(repository_id,
changeset_revision,
tool_config)
changeset_revision,
tool_config)
tool_state = tool_util.new_state(trans, tool, invalid=True)
invalid_file_tups = []
if tool:
@@ -2931,7 +2931,7 @@ class RepositoryController(BaseUIController, ratings_util.ItemRatings):
if message:
status = 'error'
else:
tool, message, sample_files = \
tool, valid, message, sample_files = \
tv.handle_sample_files_and_load_tool_from_tmp_config(repo,
repository_id,
changeset_revision,
+1 -1
View File
@@ -225,7 +225,7 @@ class ToolValidator(object):
# Load entries into the tool_data_tables if the tool requires them.
tool_data_table_config = os.path.join(work_dir, 'tool_data_table_conf.xml')
error, message = self.stdtm.handle_sample_tool_data_table_conf_file(tool_data_table_config,
persist=False)
persist=False)
manifest_ctx, ctx_file = hg_util.get_ctx_file_path_from_manifest(tool_config_filename, repo, changeset_revision)
if manifest_ctx and ctx_file:
tool, valid, message2 = self.load_tool_from_tmp_config(repo, repository_id, manifest_ctx, ctx_file, work_dir)