noosfero | Migration to article invalid in Suggest Article (!1232)

Rodrigo Souto gitlab at mg.gitlab.com
Mon Jun 12 17:51:29 BRT 2017


Rodrigo Souto started a new discussion on db/migrate/20170607131552_update_suggest_article_data.rb:

> +class UpdateSuggestArticleData < ActiveRecord::Migration
> +  def change
> +  say_with_time "Updating suggest article datas..." do
> +    Task.all.each do |task|
> +       if task.type == "SuggestArticle" && task.data[:article].nil?
> +         data = task.data
> +         article = []

You don't need to instantiate the `article` variable with an empty array. Just remove this line.

---
Reply to this email directly or view it on GitLab: https://gitlab.com/noosfero/noosfero/merge_requests/1232#note_32139876
You're receiving this email because of your account on gitlab.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listas.softwarelivre.org/pipermail/noosfero-dev/attachments/20170612/763d28e1/attachment-0001.html>


More information about the Noosfero-dev mailing list