diff --git a/app/models/user.rb b/app/models/user.rb
index c2a7317e7..aa02ecb4c 100644
--- a/app/models/user.rb
+++ b/app/models/user.rb
@@ -695,6 +695,10 @@ class User < ApplicationRecord
LimitForbidControl::UserLogin.new(self).clear
end
+ def from_sub_site?
+ laboratory_id.present? && laboratory_id != 1
+ end
+
protected
def validate_password_length
# 管理员的初始密码是5位
diff --git a/app/services/subjects/copy_subject_service.rb b/app/services/subjects/copy_subject_service.rb
index 987dfaa4a..99f5dcdc5 100644
--- a/app/services/subjects/copy_subject_service.rb
+++ b/app/services/subjects/copy_subject_service.rb
@@ -177,7 +177,7 @@ class Subjects::CopySubjectService < ApplicationService
def copy_challenge_questions_data!(challenge_choose, to_challenge_choose)
challenge_choose.challenge_questions.each do |challenge_question|
to_challenge_question = to_challenge_choose.challenge_questions.new
- to_challenge_question.attributes = challenge_question.attributes.dup.except('id,', 'challenge_choose_id')
+ to_challenge_question.attributes = challenge_question.attributes.dup.except('id', 'challenge_choose_id')
to_challenge_question.challenge_choose_id = to_challenge_choose.id
to_challenge_question.save!
end
diff --git a/app/views/admins/identity_authentications/shared/_list.html.erb b/app/views/admins/identity_authentications/shared/_list.html.erb
index e1c603215..607feb93a 100644
--- a/app/views/admins/identity_authentications/shared/_list.html.erb
+++ b/app/views/admins/identity_authentications/shared/_list.html.erb
@@ -43,6 +43,9 @@
<%= link_to "/users/#{user.login}", class: 'identity-authentication-avatar', target: '_blank', data: { toggle: 'tooltip', title: '个人主页' } do %>
<% end %>
+ <% if user.from_sub_site? %>
+ 合作
+ <% end %>