From 2a7a98a2d980a70104832fa4ab5fdc2c5917e8d1 Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Tue, 14 Jul 2020 13:53:26 +0800 Subject: [PATCH] fixbug --- lib/tasks/user_agent.rake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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