Skip to content

Commit

Permalink
Merge pull request solidusio#5955 from mamhoff/remove-unnecessary-dec…
Browse files Browse the repository at this point in the history
…orator
  • Loading branch information
tvdeyen authored Nov 30, 2024
2 parents 68c4b1a + 9a74fda commit b388c0a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 16 deletions.

This file was deleted.

9 changes: 9 additions & 0 deletions legacy_promotions/app/models/spree/promotion_code_batch.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,14 @@ class CantProcessStartedBatch < StandardError
def finished?
state == "completed"
end

def process
if state == "pending"
update!(state: "processing")
PromotionCodeBatchJob.perform_later(self)
else
raise CantProcessStartedBatch.new("Batch #{id} already started")
end
end
end
end

0 comments on commit b388c0a

Please sign in to comment.