Return early if OC is closed

This commit is contained in:
Matt-Yorkley
2022-02-16 12:53:22 +00:00
parent 8c8b9d1b23
commit d4488fdb3f

View File

@@ -275,7 +275,7 @@ class OrderCycle < ApplicationRecord
private
def sync_subscriptions
return unless schedule_ids.any?
return unless open? && schedule_ids.any?
subscriptions = Subscription.where(schedule_id: schedule_ids)
syncer = OrderManagement::Subscriptions::ProxyOrderSyncer.new(subscriptions)