Commit 8f4a00d12624a74a26dfdf36547d021cc0cc59bb

Authored by Gustavo Coelho
1 parent 8ac18ed9

Fixing migration

Checking if comments is empty before execute delete
statement because the clause IN has to have a argument.

Signed-off-by: Gustavo Coelho <gust.rod.coelho@gmail.com>
plugins/organization_ratings/db/migrate/20151203121430_destroy_rejected_reports.rb
... ... @@ -5,7 +5,9 @@ class DestroyRejectedReports &lt; ActiveRecord::Migration
5 5 settings = YAML.load(task['data'])
6 6 comments << settings[:organization_rating_comment_id]
7 7 end
8   - execute("DELETE FROM comments WHERE id IN (#{comments.join(',')})")
  8 + if !comments.empty?
  9 + execute("DELETE FROM comments WHERE id IN (#{comments.join(',')})")
  10 + end
9 11 end
10 12  
11 13 def down
... ...