mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2025-02-19 13:54:25 +01:00
fix rollback with payzen objects in Db
This commit is contained in:
parent
2c6b3aaa75
commit
358400d69e
@ -177,10 +177,13 @@ class MigrateStripeIdsToPaymentGatewayObjects < ActiveRecord::Migration[5.2]
|
||||
when 'Stripe::Customer'
|
||||
'stp_customer_id'
|
||||
else
|
||||
raise "Unknown gateway_object_type #{pgo.gateway_object_type}"
|
||||
puts "Unknown gateway_object_type #{pgo.gateway_object_type}, ignoring..."
|
||||
nil
|
||||
end
|
||||
item = pgo.item
|
||||
item.update_column(attr, pgo.gateway_object_id)
|
||||
if attr
|
||||
item = pgo.item
|
||||
item.update_column(attr, pgo.gateway_object_id)
|
||||
end
|
||||
end
|
||||
|
||||
# chain all records
|
||||
|
Loading…
x
Reference in New Issue
Block a user