Skip to content

Commit

Permalink
Merge pull request #425 from codeforjapan/develop
Browse files Browse the repository at this point in the history
feat: add replace to null ParticipatoryProcess command
  • Loading branch information
ayuki-joto authored Sep 15, 2022
2 parents c3dfed1 + 93d3a7a commit 9c3b17d
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions lib/tasks/replace_to_null.rake
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,14 @@ namespace :replace_to_null do
end
end
end

desc 'fix participatory_processes edit bug.Make all "" columns of decidim_participatory_processes table null'
task decidim_participatory_processes: :environment do
Decidim::ParticipatoryProcess.transaction do
Decidim::ParticipatoryProcess.all.each do |org|
org.announcement = nil if org.announcement == ""
org.save!
end
end
end
end

0 comments on commit 9c3b17d

Please sign in to comment.