Skip to content

Commit

Permalink
fix: delete.rake
Browse files Browse the repository at this point in the history
  • Loading branch information
ayuki-joto committed Apr 8, 2024
1 parent 5af6856 commit a41ffa2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ def call
puts "destroy participatory_process_group id: #{participatory_process_group.id}"
participatory_process_group.destroy!
end
Decidim::ParticipatoryProcessType.where(organization: organization).destroy_all
Decidim::NavigationMaps::Blueprint.where(organization: organization).destroy_all
Decidim::ContentBlock.where(organization: organization).destroy_all
Decidim::Scope.where(organization: organization).destroy_all
Decidim::ScopeType.where(organization: organization).destroy_all
Expand Down
2 changes: 1 addition & 1 deletion lib/tasks/delete.rake
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ namespace :delete do
organization = decidim_find_organization
return unless organization

form = Struct.new(valid?: true, delete_reason: "Testing")
form = OpenStruct.new(valid?: true, delete_reason: "Testing")
Decidim::User.transaction do
Decidim::User.where(organization: organization).find_each(batch_size: 100) do |user|
Decidim::Gamifications::DestroyAllBadges.call(organization, user)
Expand Down

0 comments on commit a41ffa2

Please sign in to comment.