Commit da1dcd8c3479cdebfea6cec08ce4b911bb7076f2
Committed by
Fabio Teixeira
1 parent
e45cbbf7
Exists in
master
and in
5 other branches
Fix software_categories edition save
Signed-off-by: Arthur Del Esposte <arthurmde@gmail.com> Signed-off-by: Gabriela Navarro <navarro1703@gmail.com> Signed-off-by: Gustavo Jaruga <darksshades@gmail.com>
Showing
1 changed file
with
2 additions
and
3 deletions
Show diff stats
controllers/mpog_software_plugin_myprofile_controller.rb
... | ... | @@ -74,7 +74,7 @@ class MpogSoftwarePluginMyprofileController < MyProfileController |
74 | 74 | @software_categories = @software_info.software_categories |
75 | 75 | @software_categories = SoftwareCategories.new if @software_categories.blank? |
76 | 76 | if request.post? |
77 | - @software_info = SoftwareInfo.find(Community.where(:name => params[:name]).first.software_info.id) | |
77 | + @software_info = @profile.software_info | |
78 | 78 | @license = LicenseInfo.find(params[:license][:license_infos_id]) |
79 | 79 | @software_info.license_info = @license |
80 | 80 | @software_info.update_attributes(params[:software]) |
... | ... | @@ -84,8 +84,7 @@ class MpogSoftwarePluginMyprofileController < MyProfileController |
84 | 84 | @list_databases = DatabaseHelper.list_database(params[:database]) |
85 | 85 | @software_categories = SoftwareCategories::new params[:software_categories] |
86 | 86 | @list_operating_systems = OperatingSystemHelper.list_operating_system(params[:operating_system]) |
87 | - | |
88 | - @software_info.software_categories = @software_categories | |
87 | + @software_info.software_categories = @software_categorie unless params[:software_categories].nil? | |
89 | 88 | |
90 | 89 | if not @list_libraries.nil? |
91 | 90 | @software_info.libraries.destroy_all | ... | ... |