Commit 9103d988ebe5ef256c7bd8a164f0e0e1893b122b
1 parent
408b7dd3
Exists in
master
and in
5 other branches
Small fix
Showing
1 changed file
with
1 additions
and
1 deletions
Show diff stats
lib/mpog_software_plugin.rb
@@ -228,7 +228,7 @@ class MpogSoftwarePlugin < Noosfero::Plugin | @@ -228,7 +228,7 @@ class MpogSoftwarePlugin < Noosfero::Plugin | ||
228 | return if context.session[:user].nil? or context.session[:hide_incomplete_percentage] == true | 228 | return if context.session[:user].nil? or context.session[:hide_incomplete_percentage] == true |
229 | 229 | ||
230 | person = Person.where(:user_id=>context.session[:user]).first | 230 | person = Person.where(:user_id=>context.session[:user]).first |
231 | - if context.profile.person? and !person.nil? | 231 | + if context.profile && context.profile.person? and !person.nil? |
232 | @profile_edit_link = link_to _("Complete your profile"), "/myprofile/#{person.identifier}/profile_editor/edit" | 232 | @profile_edit_link = link_to _("Complete your profile"), "/myprofile/#{person.identifier}/profile_editor/edit" |
233 | @percentege = calc_percentage_registration(person) | 233 | @percentege = calc_percentage_registration(person) |
234 | if @percentege >= 0 and @percentege <= 100 | 234 | if @percentege >= 0 and @percentege <= 100 |