fix: project private params to boolean

This commit is contained in:
yystopf 2021-11-29 14:43:29 +08:00
parent f8654edc3b
commit 7499d8af89
1 changed files with 1 additions and 1 deletions

View File

@ -60,6 +60,6 @@ class Projects::CreateService < ApplicationService
# end
def repo_is_public
params[:private].blank? ? true : !params[:private]
params[:private].blank? ? true : !(ActiveModel::Type::Boolean.new.cast(params[:private]).nil? ? false : ActiveModel::Type::Boolean.new.cast(params[:private]))
end
end