Commit 8ee805f8c6e6ec9959c00de92aac8fbb345eb675
1 parent
62e0879a
Exists in
master
and in
1 other branch
Fix when public software checkbox is unmarked
- when the community owner edit the software, the checkbox to public software is unmarked incorrectly.
Showing
1 changed file
with
3 additions
and
1 deletions
Show diff stats
src/noosfero-spb/software_communities/controllers/software_communities_plugin_myprofile_controller.rb
... | ... | @@ -35,7 +35,6 @@ class SoftwareCommunitiesPluginMyprofileController < MyProfileController |
35 | 35 | software_info_insert_models.call(@list_operating_systems, 'operating_systems') |
36 | 36 | begin |
37 | 37 | raise NotAdminException unless can_change_public_software? |
38 | - @software_info.public_software = params['software']['public_software'].present? | |
39 | 38 | @software_info.update_attributes!(params[:software]) |
40 | 39 | |
41 | 40 | @community = @software_info.community |
... | ... | @@ -66,7 +65,10 @@ class SoftwareCommunitiesPluginMyprofileController < MyProfileController |
66 | 65 | @software_info.errors.add(:base, _("You don't have permission to change public software attributes")) |
67 | 66 | return false |
68 | 67 | end |
68 | + else | |
69 | + @software_info.public_software = params['software']['public_software'].present? | |
69 | 70 | end |
71 | + | |
70 | 72 | return true |
71 | 73 | end |
72 | 74 | ... | ... |