diff --git a/plugins/organization_ratings/db/migrate/20151203121430_destroy_rejected_reports.rb b/plugins/organization_ratings/db/migrate/20151203121430_destroy_rejected_reports.rb index 56329ac..d3836a1 100644 --- a/plugins/organization_ratings/db/migrate/20151203121430_destroy_rejected_reports.rb +++ b/plugins/organization_ratings/db/migrate/20151203121430_destroy_rejected_reports.rb @@ -5,7 +5,9 @@ class DestroyRejectedReports < ActiveRecord::Migration settings = YAML.load(task['data']) comments << settings[:organization_rating_comment_id] end - execute("DELETE FROM comments WHERE id IN (#{comments.join(',')})") if comments.present? + if !comments.empty? + execute("DELETE FROM comments WHERE id IN (#{comments.join(',')})") + end end def down -- libgit2 0.21.2