# HG changeset patch # User Chris Cannam # Date 1285776748 -3600 # Node ID 20392d0e42490aa7cee3aa075b12e93cd1c8d032 # Parent ca82a3468d27bea34ffb4730f6fea10e25f1e731 * Work around db migrate failure diff -r ca82a3468d27 -r 20392d0e4249 vendor/plugins/redmine_checkout/db/migrate/20100808185600_change_protocol_storage_from_hash_to_array.rb --- a/vendor/plugins/redmine_checkout/db/migrate/20100808185600_change_protocol_storage_from_hash_to_array.rb Fri Sep 24 14:17:42 2010 +0100 +++ b/vendor/plugins/redmine_checkout/db/migrate/20100808185600_change_protocol_storage_from_hash_to_array.rb Wed Sep 29 17:12:28 2010 +0100 @@ -15,6 +15,7 @@ def self.up ## First migrate the individual repositories Repository.all.each do |r| + next unless r.checkout_settings next unless r.checkout_settings['checkout_protocols'].is_a? Hash r.checkout_settings['checkout_protocols'] = r.checkout_settings['checkout_protocols'].sort{|(ak,av),(bk,bv)|ak<=>bk}.collect{|id,protocol| protocol} r.save! @@ -54,4 +55,4 @@ raise ActiveRecord::IrreversibleMigration.new "Sorry, there is no down migration yet. If you really need one, please create an issue on http://dev.holgerjust.de/projects/redmine-checkout" end -end \ No newline at end of file +end