mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2025-01-18 07:52:23 +01:00
[bug] unable to sync coupons on stripe
This commit is contained in:
parent
209a2f4acf
commit
f5126084b9
@ -5,6 +5,7 @@
|
||||
- Fix a bug: unable to book a free event
|
||||
- Fix a bug: can't see the dates for the next booked training session, when the user is reserving a machine without the appropriate training
|
||||
- Fix a bug: invalid link to the user's manual
|
||||
- Fix a bug: unable to sync coupons on stripe
|
||||
|
||||
## v5.0.4 2021 June 15
|
||||
|
||||
|
@ -26,9 +26,9 @@ class SyncObjectsOnStripeWorker
|
||||
total = Coupon.all.count
|
||||
Coupon.all.each_with_index do |coupon, index|
|
||||
logger.debug "#{index} / #{total}"
|
||||
Stripe::Coupon.retrieve(c.code, api_key: Setting.get('stripe_secret_key'))
|
||||
Stripe::Coupon.retrieve(coupon.code, api_key: Setting.get('stripe_secret_key'))
|
||||
rescue Stripe::InvalidRequestError
|
||||
Stripe::Service.create_coupon(c.id)
|
||||
Stripe::Service.create_coupon(coupon.id)
|
||||
end
|
||||
|
||||
w = StripeWorker.new
|
||||
|
Loading…
x
Reference in New Issue
Block a user