Skip to content

Commit

Permalink
fix visibility update bug (OpenCSGs#108)
Browse files Browse the repository at this point in the history
  • Loading branch information
zhendi authored Mar 29, 2024
1 parent 6c0ef98 commit 20e475b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def create
end

def update
if params[:private].present?
if params[:private].to_s.present?
@application_space.visibility = params[:private].to_s == 'true' ? 'private' : 'public'
end

Expand Down
2 changes: 1 addition & 1 deletion app/controllers/internal_api/codes_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def create
end

def update
if params[:private].present?
if params[:private].to_s.present?
@code.visibility = params[:private].to_s == 'true' ? 'private' : 'public'
end

Expand Down
2 changes: 1 addition & 1 deletion app/controllers/internal_api/models_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def create
end

def update
if params[:private].present?
if params[:private].to_s.present?
@model.visibility = params[:private].to_s == 'true' ? 'private' : 'public'
end

Expand Down

0 comments on commit 20e475b

Please sign in to comment.