From 8f4a00d12624a74a26dfdf36547d021cc0cc59bb Mon Sep 17 00:00:00 2001 From: Gustavo Coelho Date: Fri, 4 Dec 2015 16:06:07 +0000 Subject: [PATCH] Fixing migration --- 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 7d08281..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.empty? + execute("DELETE FROM comments WHERE id IN (#{comments.join(',')})") + end end def down -- libgit2 0.21.2