Skip to content

Commit

Permalink
[api] Pass names to jobhistory_list
Browse files Browse the repository at this point in the history
Pass project name as is the only thing needed and by coherence with the
other paramethers.

Rename attributes in jobhistory_list to make clear they are just strings
with the name and not objects.
  • Loading branch information
Ana06 committed Sep 4, 2018
1 parent e535b47 commit cb99952
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Expand Up @@ -7,7 +7,7 @@ class JobHistoryController < WebuiController
before_action :set_architecture

def index
@jobshistory = @package.jobhistory_list(@project, @repository.name, @architecture.name, @package_name)
@jobshistory = @package.jobhistory_list(@project.name, @repository.name, @architecture.name, @package_name)
end

private
Expand Down
4 changes: 2 additions & 2 deletions src/api/app/models/package.rb
Expand Up @@ -914,9 +914,9 @@ def buildresult(prj = project, show_all = false)
LocalBuildResult::ForPackage.new(package: self, project: prj, show_all: show_all)
end

def jobhistory_list(project, repository, arch, package_name)
def jobhistory_list(project_name, repository_name, arch_name, package_name)
begin
results = Xmlhash.parse(Backend::Api::BuildResults::JobHistory.all_for_package(project.name, package_name, repository, arch))
results = Xmlhash.parse(Backend::Api::BuildResults::JobHistory.all_for_package(project_name, package_name, repository_name, arch_name))
rescue Backend::Error
return []
end
Expand Down

0 comments on commit cb99952

Please sign in to comment.