Skip to content

Commit

Permalink
fix(db): Prevent initatives migration fail
Browse files Browse the repository at this point in the history
  • Loading branch information
Quentinchampenois committed Jan 30, 2025
1 parent e6e4c3b commit bcb0841
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
class FixUserGroupsIdsOnInitiatives < ActiveRecord::Migration[5.2]
# rubocop:disable Rails/SkipsModelValidations
def change
return unless defined?(Decidim::Initiative)

Decidim::UserGroup.find_each do |group|
old_id = group.extended_data["old_user_group_id"]
next unless old_id
Expand Down

0 comments on commit bcb0841

Please sign in to comment.