修改sync_user_forte
This commit is contained in:
parent
e3dba02c03
commit
b9ee72b3b5
|
@ -12,9 +12,10 @@ class SyncUserForgeTask
|
||||||
user_params = u.as_json
|
user_params = u.as_json
|
||||||
user_extension_params = u.try(:user_extensions).as_json || []
|
user_extension_params = u.try(:user_extensions).as_json || []
|
||||||
target_params = []
|
target_params = []
|
||||||
if u.projects.present?
|
user_projects = Project.where(user_id: u.id)
|
||||||
projects = u.projects.includes(:versions,:repository,:project_score, issues: [:journals],owner: [:user_extensions], members: [roles: [:member_roles]])
|
if user_projects.present?
|
||||||
projects.find_each do |p|
|
projects = user_projects.includes(:versions,:repository,:project_score, issues: [:journals],owner: [:user_extensions], members: [roles: [:member_roles]])
|
||||||
|
projects.each do |p|
|
||||||
identifier = p.try(:identifier)
|
identifier = p.try(:identifier)
|
||||||
if p.repository.present? && p.repository.try(:identifier).present?
|
if p.repository.present? && p.repository.try(:identifier).present?
|
||||||
identifier = p.repository.try(:identifier)
|
identifier = p.repository.try(:identifier)
|
||||||
|
|
Loading…
Reference in New Issue