Skip to content

Commit

Permalink
fix(service): do not crash when exporting a nil license_id
Browse files Browse the repository at this point in the history
  • Loading branch information
imobachgs committed Jan 17, 2025
1 parent 24fedc6 commit bb6da7a
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions service/lib/agama/dbus/software/product.rb
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,16 @@ def issues

def available_products
backend.products.map do |product|
data = {
"description" => product.localized_description,
"icon" => product.icon,
"registration" => product.registration
}
data["license_id"] = product.license_id if product.license_id
[
product.id,
product.display_name,
{
"description" => product.localized_description,
"icon" => product.icon,
"registration" => product.registration,
"license_id" => product.license_id
}
data
]
end
end
Expand Down

0 comments on commit bb6da7a

Please sign in to comment.