diff --git a/lib/tasks/user_agent.rake b/lib/tasks/user_agent.rake index 98d6ef8e..b5009fcd 100644 --- a/lib/tasks/user_agent.rake +++ b/lib/tasks/user_agent.rake @@ -22,7 +22,7 @@ namespace :sync do end # 用户报名情况 - created_at = TeamMember.where(user_id: user_action.try(:user_id)).maximum(:created_at) + created_at = TeamMember.where(user_id: user_action).maximum(:created_at) if created_at # 即代理之前报名的 if created_at < ua.created_at