summaryrefslogtreecommitdiff
path: root/app/services/solidus_subscriptions/line_item_builder.rb
diff options
context:
space:
mode:
authorAlessandro Desantis <desa.alessandro@gmail.com>2020-11-23 16:09:29 +0100
committerAlessandro Desantis <desa.alessandro@gmail.com>2020-11-23 16:09:29 +0100
commit79d099e214422a34c85bcbba92e0027a3b77ff57 (patch)
tree3421fa4b0605ec5a719f26ca6b44eda560ffdc97 /app/services/solidus_subscriptions/line_item_builder.rb
parent8bf81a8b92d27dd7fb3948437ef023c83fcde77e (diff)
Fix legacy unsubscribable subscriptions not being processed
If a customer subscribed to an item that is now unsubscribable, we don't want to stop processing their subscription all of a sudden. Admins should be able to decide whether they want to grandfather the customers out of the subscription or keep them on the subscription indefinitely, while preventing new customers from subscribing.
Diffstat (limited to 'app/services/solidus_subscriptions/line_item_builder.rb')
-rw-r--r--app/services/solidus_subscriptions/line_item_builder.rb1
1 files changed, 0 insertions, 1 deletions
diff --git a/app/services/solidus_subscriptions/line_item_builder.rb b/app/services/solidus_subscriptions/line_item_builder.rb
index d258787..c9aedb9 100644
--- a/app/services/solidus_subscriptions/line_item_builder.rb
+++ b/app/services/solidus_subscriptions/line_item_builder.rb
@@ -24,7 +24,6 @@ module SolidusSubscriptions
line_items = subscription_line_items.map do |subscription_line_item|
variant = subscription_line_item.subscribable
- raise UnsubscribableError, variant unless variant.subscribable?
next unless variant.can_supply?(subscription_line_item.quantity)
::Spree::LineItem.new(variant: variant, quantity: subscription_line_item.quantity)