[FIX]join projects add org projects and update project private bug

This commit is contained in:
2021-02-21 15:20:04 +08:00
parent 11471b1520
commit f7b7122d60
2 changed files with 9 additions and 7 deletions

View File

@@ -76,7 +76,7 @@ class ProjectsController < ApplicationController
default_branch: params[:default_branch]
}
if [true, false].include? private
new_project_params = project_params.merge(is_public: !private)
new_project_params = project_params.except(:private).merge(is_public: !private)
Gitea::Repository::UpdateService.call(@owner, @project.identifier, gitea_params)
@project.repository.update_column(:hidden, private)
end