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