Skip to content

Commit

Permalink
Extract release_targets in one line
Browse files Browse the repository at this point in the history
  • Loading branch information
vpereira committed Feb 20, 2020
1 parent bfb0d86 commit 63b5dcb
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/api/app/models/bs_request_action.rb
Original file line number Diff line number Diff line change
Expand Up @@ -574,10 +574,7 @@ def create_expand_package(packages, opts = {})
new_targets.uniq!
new_packages.uniq!
new_packages.each do |pkg|
release_targets = nil
if pkg.is_patchinfo?
release_targets = Patchinfo.new.fetch_release_targets(pkg)
end
release_targets = pkg.is_patchinfo? ? Patchinfo.new.fetch_release_targets(pkg) : nil
new_targets.each do |new_target_project|
if release_targets.present?
next unless release_targets.any? { |rt| rt['project'] == new_target_project }
Expand Down

0 comments on commit 63b5dcb

Please sign in to comment.