From a51e24d405a6f65df586e3373f5916e5cad1693f Mon Sep 17 00:00:00 2001 From: Thiago Ribeiro Date: Fri, 4 Dec 2015 16:06:07 +0000 Subject: [PATCH] Fixing migration 20151203121430 --- plugins/organization_ratings/db/migrate/20151203121430_destroy_rejected_reports.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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