From 0969a30961b0de86fbc8ee9266f537ee3e654cd8 Mon Sep 17 00:00:00 2001 From: Jorge Manrubia Date: Sat, 27 Sep 2025 07:52:37 +0200 Subject: [PATCH] Fix script condition --- script/migrations/populate_columns_from_workflow_stages.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/script/migrations/populate_columns_from_workflow_stages.rb b/script/migrations/populate_columns_from_workflow_stages.rb index ce21ef792..27625164b 100755 --- a/script/migrations/populate_columns_from_workflow_stages.rb +++ b/script/migrations/populate_columns_from_workflow_stages.rb @@ -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"