Commit 6f11d7166d3c8fe85a879eaec73cb5cff17262b7
1 parent
30f5ba9a
Exists in
master
and in
5 other branches
Fix edit profile
Signed-off-by: Gustavo Jaruga <darksshades@hotmail.com> Signed-off-by: Parley Martins <parley@outlook.com> Signed-off-by: Gabriela Navarro <navarro1703@gmail.com>
Showing
1 changed file
with
4 additions
and
1 deletions
Show diff stats
lib/mpog_software_plugin.rb
@@ -110,7 +110,10 @@ class MpogSoftwarePlugin < Noosfero::Plugin | @@ -110,7 +110,10 @@ class MpogSoftwarePlugin < Noosfero::Plugin | ||
110 | 110 | ||
111 | unless is_admin | 111 | unless is_admin |
112 | institution = profile.user.institutions | 112 | institution = profile.user.institutions |
113 | - params[:institution][:sisp] = institution.sisp if params[:institution][:sisp] != institution.sisp | 113 | + |
114 | + if !params[:institution].blank? and !params[:institution][:sisp].nil? | ||
115 | + params[:institution][:sisp] = institution.sisp if params[:institution][:sisp] != institution.sisp | ||
116 | + end | ||
114 | end | 117 | end |
115 | end | 118 | end |
116 | end | 119 | end |