Fix script condition

This commit is contained in:
Jorge Manrubia
2025-09-27 07:52:37 +02:00
parent 6a231b48f2
commit 0969a30961
@@ -41,7 +41,7 @@ ApplicationRecord.with_each_tenant do |tenant|
# Associate cards with their corresponding columns based on stages
collection.cards.includes(:stage).find_each do |card|
next if !card.doing? || card.stage.present?
next if !card.doing? || card.stage.blank?
unless card.stage.workflow.collections.include?(collection)
puts "Corrupt data: the card with id #{card.id} has the stage #{card.stage.name} with id #{card.stage.id} that belongs to a workflow not asociated ot its collection"