Skip to content

Commit

Permalink
Prevent exceptions when accessing @appdata
Browse files Browse the repository at this point in the history
For many distributions we don't load @appdata. @appdata is still
accessed, expecting that it always exists and contains :apps and
:categories. With this change, those accesses don't throw exceptions.

Fixes openSUSE#885.
  • Loading branch information
agraul committed Oct 30, 2020
1 parent cbbfb18 commit 3a4b468
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/controllers/application_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,8 @@ def prepare_appdata
leap_appdata(@testing_version)
when "openSUSE:Leap:#{@legacy_release}"
leap_appdata(@legacy_release)
else
{ apps: [], categories: Set.new }
end
end

Expand Down

0 comments on commit 3a4b468

Please sign in to comment.