Skip to content

Commit

Permalink
Refs #36721 - Fix rubocop
Browse files Browse the repository at this point in the history
  • Loading branch information
parthaa committed Sep 6, 2023
1 parent 29ba076 commit 79b260e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/models/katello/concerns/host_managed_extensions.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def check_cve_attributes(attrs)
end

def attributes=(attrs)
check_cve_attributes(attrs) unless self.content_facet.blank?
check_cve_attributes(attrs) #unless self.content_facet.blank?
super
end

Expand Down
3 changes: 2 additions & 1 deletion app/models/katello/host/content_facet.rb
Original file line number Diff line number Diff line change
Expand Up @@ -93,12 +93,13 @@ def single_lifecycle_environment
content_view_environments&.first&.lifecycle_environment
end

# rubocop:disable Metrics/CyclomaticComplexity
def assign_single_environment(
content_view_id: nil, lifecycle_environment_id: nil, environment_id: nil,
content_view: nil, lifecycle_environment: nil, environment: nil
)
lifecycle_environment_id ||= environment_id || lifecycle_environment&.id || environment&.id || self.single_lifecycle_environment&.id
content_view_id ||= content_view&.id || self.single_content_view&.id
content_view_id ||= content_view&.id || self.single_content_view&.id

unless lifecycle_environment_id
fail _("Lifecycle environment must be specified")
Expand Down

0 comments on commit 79b260e

Please sign in to comment.