diff --git a/rails_application/app/services/client/orders/submit_service.rb b/rails_application/app/services/client/orders/submit_service.rb index 2b618341..3def1ce2 100644 --- a/rails_application/app/services/client/orders/submit_service.rb +++ b/rails_application/app/services/client/orders/submit_service.rb @@ -23,10 +23,9 @@ def call end .call - if unavailable_products.any? - raise OrderHasUnavailableProducts.new(unavailable_products) - end - true + if unavailable_products.any? + raise OrderHasUnavailableProducts.new(unavailable_products) + end end private