fix: license is secret delay

This commit is contained in:
yystopf 2022-01-18 18:32:33 +08:00
parent 04f2dbee9a
commit e7af0e2e47
1 changed files with 1 additions and 1 deletions

View File

@ -61,7 +61,7 @@ class Projects::CreateService < ApplicationService
def repo_is_public
license = License.find_by_id(params[:license_id])
if license.is_secret
if license&.is_secret
false
else
params[:private].blank? ? true : !(ActiveModel::Type::Boolean.new.cast(params[:private]).nil? ? false : ActiveModel::Type::Boolean.new.cast(params[:private]))