Skip to content

Commit

Permalink
Merge pull request #544 from yast/fix_missing_product_crash
Browse files Browse the repository at this point in the history
fix missing product crash
  • Loading branch information
jreidinger committed Nov 1, 2021
2 parents c260a10 + 4f0df6e commit 9dd7fc0
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/lib/registration/clients/scc_auto.rb
Original file line number Diff line number Diff line change
Expand Up @@ -205,20 +205,16 @@ def online_medium_config

selected_product = Yast::AutoinstFunctions.selected_product
log.info "selected product #{selected_product.inspect}"
ay_product = if selected_product.respond_to?(:name)
selected_product.name
else
selected_product.details.product
end

if !ay_product
if !selected_product
# TRANSLATORS: error message, %s is the XML path, e.g. "software/products"
Yast::Report.Error(
_("Missing product specification in the %s section") % "software/products"
)
return false
end

ay_product = selected_product.name
control_product = products.find { |p| p.name == ay_product }

if !control_product
Expand Down

0 comments on commit 9dd7fc0

Please sign in to comment.