Skip to content

Commit

Permalink
[webui] fix disturl handling for packages build via linkedbuild
Browse files Browse the repository at this point in the history
  • Loading branch information
adrianschroeter committed Oct 21, 2015
1 parent 18ea670 commit 2091db8
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions src/api/app/controllers/webui/search_controller.rb
Expand Up @@ -56,14 +56,12 @@ def search
unless disturl_pkgrev.nil?
disturl_rev, disturl_package = disturl_pkgrev.split('-', 2)
end
unless disturl_package.nil? || disturl_rev.nil?
project = Project.find_by(name: disturl_project)
package = Package.find_by_project_and_name(disturl_project, disturl_package)
end
if project && package
redirect_to controller: 'package', action: 'show', project: disturl_project, package: disturl_package, rev: disturl_rev and return
if Package.exists_by_project_and_name(disturl_project, disturl_package)
redirect_to controller: 'package', action: 'show', project: disturl_project, package: disturl_package, rev: disturl_rev
return
else
redirect_to :back, notice: 'Sorry, this disturl does not compute...' and return
redirect_to :back, notice: 'Sorry, this disturl does not compute...'
return
end
end

Expand Down

0 comments on commit 2091db8

Please sign in to comment.