Skip to content

Commit

Permalink
inst_proposal.rb - handle nil Autoyast proposal list
Browse files Browse the repository at this point in the history
do not display empty proposal when nil is received
from AutoinstConfig.getProposalList()
  • Loading branch information
lslezak committed Sep 10, 2013
1 parent f699928 commit 254bc88
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/clients/inst_proposal.rb
Expand Up @@ -898,9 +898,12 @@ def load_matching_submodules_list
@submodules_presentation = Builtins.maplist(modules) do |mod|
Ops.get_string(mod, 0, "")
end

p = AutoinstConfig.getProposalList
@submodules_presentation = Builtins.filter(@submodules_presentation) do |v|
Builtins.contains(p, v) || p == []

if p != nil && p != []
# array intersection
@submodules_presentation = @submodules_presentation & v
end
end

Expand Down

0 comments on commit 254bc88

Please sign in to comment.