From a1e2b31b58e13045f501f4f9c323506b31a2feda Mon Sep 17 00:00:00 2001 From: Marcos Ronaldo Date: Wed, 13 Jan 2016 16:05:40 -0200 Subject: [PATCH] Fixes error in software_info get method when license_info is nil --- src/noosfero-spb/software_communities/lib/software_info.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/noosfero-spb/software_communities/lib/software_info.rb b/src/noosfero-spb/software_communities/lib/software_info.rb index a9816f2..d1ea4f9 100644 --- a/src/noosfero-spb/software_communities/lib/software_info.rb +++ b/src/noosfero-spb/software_communities/lib/software_info.rb @@ -139,7 +139,7 @@ class SoftwareInfo < ActiveRecord::Base license = LicenseInfo.find_by_id self.license_info_id license_another = LicenseInfo.find_by_version("Another") - if license_another && license.id == license_another.id + if license_another && license && license.id == license_another.id LicenseInfo.new( :version => self.another_license_version, :link => self.another_license_link -- libgit2 0.21.2