diff --git a/app/controllers/shixuns_controller.rb b/app/controllers/shixuns_controller.rb index 67c3bfbe2..f75dacecc 100644 --- a/app/controllers/shixuns_controller.rb +++ b/app/controllers/shixuns_controller.rb @@ -207,7 +207,7 @@ class ShixunsController < ApplicationController @new_shixun = Shixun.new @new_shixun.attributes = @shixun.attributes.dup.except("id","user_id","visits","gpid","status", "identifier", "averge_star", "homepage_show","repo_name", "myshixuns_count", "challenges_count", - "can_copy", "created_at", "updated_at") + "can_copy", "created_at", "updated_at", "public") @new_shixun.user_id = User.current.id @new_shixun.averge_star = 5 @new_shixun.identifier = generate_identifier Shixun, 8 diff --git a/app/services/subjects/copy_subject_service.rb b/app/services/subjects/copy_subject_service.rb index 94157dc7b..f44191fda 100644 --- a/app/services/subjects/copy_subject_service.rb +++ b/app/services/subjects/copy_subject_service.rb @@ -60,7 +60,7 @@ class Subjects::CopySubjectService < ApplicationService shixun = stage_shixun.shixun to_shixun = Shixun.new to_shixun.attributes = shixun.attributes.dup.except('id', 'user_id', 'identifier', 'homepage_show', - 'use_scope', 'averge_star', 'myshixuns_count', 'challenges_count') + 'use_scope', 'averge_star', 'myshixuns_count', 'challenges_count', "public") to_shixun.identifier = Util::UUID.generate_identifier(Shixun, 8) to_shixun.user_id = user.id if laboratory