From 9380e69a159bc34425392f139bf55687ea105aa8 Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Thu, 13 Feb 2020 20:00:57 +0800 Subject: [PATCH] 1 --- lib/tasks/statistic_subject_info.rake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/tasks/statistic_subject_info.rake b/lib/tasks/statistic_subject_info.rake index f7e6ca100..8b3199eae 100644 --- a/lib/tasks/statistic_subject_info.rake +++ b/lib/tasks/statistic_subject_info.rake @@ -132,7 +132,7 @@ namespace :subjects do ActiveRecord::Base.connection.execute sql end end - if str > 0 + if str.size > 0 sql = "REPLACE INTO subject_user_infos(#{column_value}) VALUES #{str.join(",")}" puts sql ActiveRecord::Base.connection.execute sql