Skip to content

armgit / spree

Public Imported from GitHub
0

Open Source Platform for DTC, B2B Commerce, Marketplaces & Omnichannel. REST APIs, TypeScript SDKs, and production-ready Next.js storefront. Self-host it. Own your data. No vendor lock-in. Zero platform fees.

Fixed bulk generation of coupon codes in Rails 6.1

Damian Legawiec56d3b107cd14
diff --git a/core/app/services/spree/coupon_codes/bulk_generate.rb b/core/app/services/spree/coupon_codes/bulk_generate.rb
index cbdbd1e1d1..5f61ce4cf2 100644
--- a/core/app/services/spree/coupon_codes/bulk_generate.rb
+++ b/core/app/services/spree/coupon_codes/bulk_generate.rb
@@ -27,7 +27,9 @@ module Spree
def coupon_attributes(promotion)
{
- promotion_id: promotion.id
+ promotion_id: promotion.id,
+ created_at: Time.current,
+ updated_at: Time.current
}
end
end