Commit 408b7dd3034b166d7b00896af95590c41ca414e1

Authored by Parley
1 parent 4a3474b9

Complete your profile appears only in a person profile.

Signed-off-by: Parley Martins <parley@outlook.com>
Signed-off-by: Gustavo Jaruga <darksshades@gmail.com>
Showing 1 changed file with 1 additions and 2 deletions   Show diff stats
lib/mpog_software_plugin.rb
... ... @@ -228,8 +228,7 @@ class MpogSoftwarePlugin &lt; Noosfero::Plugin
228 228 return if context.session[:user].nil? or context.session[:hide_incomplete_percentage] == true
229 229  
230 230 person = Person.where(:user_id=>context.session[:user]).first
231   -
232   - unless person.nil?
  231 + if context.profile.person? and !person.nil?
233 232 @profile_edit_link = link_to _("Complete your profile"), "/myprofile/#{person.identifier}/profile_editor/edit"
234 233 @percentege = calc_percentage_registration(person)
235 234 if @percentege >= 0 and @percentege <= 100
... ...