Skip to content

Commit

Permalink
[webui] Show package_groups without patternType
Browse files Browse the repository at this point in the history
Now we show all `package_groups` with type 'image' independenly of the
pattenType.
  • Loading branch information
David Kang committed Oct 5, 2017
1 parent 75f6003 commit 0f4b0c7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/api/app/models/kiwi/image.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class Kiwi::Image < ApplicationRecord
has_one :package, foreign_key: 'kiwi_image_id', class_name: '::Package', dependent: :nullify, inverse_of: :kiwi_image
has_many :repositories, -> { order(order: :asc) }, dependent: :destroy, index_errors: true
has_many :package_groups, -> { order(:id) }, dependent: :destroy, index_errors: true
has_many :kiwi_packages, -> { where(kiwi_package_groups: { kiwi_type: Kiwi::PackageGroup.kiwi_types[:image], pattern_type: 'onlyRequired' }) },
has_many :kiwi_packages, -> { where(kiwi_package_groups: { kiwi_type: Kiwi::PackageGroup.kiwi_types[:image] }) },
through: :package_groups, source: :packages, inverse_of: :kiwi_image

#### Callbacks macros: before_save, after_save, etc.
Expand Down Expand Up @@ -133,7 +133,7 @@ def outdated?
end

def default_package_group
package_groups.find_or_create_by(kiwi_type: :image, pattern_type: 'onlyRequired')
package_groups.find_or_create_by(kiwi_type: :image)
end

def self.find_binaries_by_name(query, project, repositories, options = {})
Expand Down

0 comments on commit 0f4b0c7

Please sign in to comment.