Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

compact the array to get rid of nils

Marcello Rocha40dc85356d5b
diff --git a/db/migrate/20230731153909_add_file_link_journals_to_existing_containers.rb b/db/migrate/20230731153909_add_file_link_journals_to_existing_containers.rb
index 1908ef5911c..0de1594e4ec 100644
--- a/db/migrate/20230731153909_add_file_link_journals_to_existing_containers.rb
+++ b/db/migrate/20230731153909_add_file_link_journals_to_existing_containers.rb
@@ -31,7 +31,7 @@
class AddFileLinkJournalsToExistingContainers < ActiveRecord::Migration[7.0]
def up
system_user = SystemUser.first
- containers = Storages::FileLink.includes(:container).map(&:container).uniq
+ containers = Storages::FileLink.includes(:container).map(&:container).uniq.compact
containers.each do |container|
next unless container.class.journaled?