diff options
Diffstat (limited to 'qa/qa/resource/package.rb')
-rw-r--r-- | qa/qa/resource/package.rb | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/qa/qa/resource/package.rb b/qa/qa/resource/package.rb index 1009353a296..0e8c3ee95de 100644 --- a/qa/qa/resource/package.rb +++ b/qa/qa/resource/package.rb @@ -15,11 +15,10 @@ module QA end attribute :id do - packages = project.packages - - return unless (this_package = packages&.find { |package| package[:name] == "#{project.path_with_namespace}/#{name}" }) # rubocop:disable Cop/AvoidReturnFromBlocks + this_package = project.packages + &.find { |package| package[:name] == name } - this_package[:id] + this_package.try(:fetch, :id) end def fabricate! |