diff --git a/lib/mpog_software_plugin.rb b/lib/mpog_software_plugin.rb index 88a3e78..2a295f8 100644 --- a/lib/mpog_software_plugin.rb +++ b/lib/mpog_software_plugin.rb @@ -228,7 +228,7 @@ class MpogSoftwarePlugin < Noosfero::Plugin return if context.session[:user].nil? or context.session[:hide_incomplete_percentage] == true person = Person.where(:user_id=>context.session[:user]).first - if context.profile.person? and !person.nil? + if context.profile && context.profile.person? and !person.nil? @profile_edit_link = link_to _("Complete your profile"), "/myprofile/#{person.identifier}/profile_editor/edit" @percentege = calc_percentage_registration(person) if @percentege >= 0 and @percentege <= 100 -- libgit2 0.21.2