~singpolyma/whiplash-mboa

da3be64b4c0ab414cf1a19604b76bf78811aac39 — Stephen Paul Weber 9 months ago b53d6a3
Do not process unless shop matches
2 files changed, 2 insertions(+), 1 deletions(-)

M .rubocop.yml
M app/jobs/sync_assigned_orders_job.rb
M .rubocop.yml => .rubocop.yml +1 -1
@@ 36,7 36,7 @@ Metrics/BlockLength:
    - config/**/*

Metrics/AbcSize:
  Max: 80
  Max: 85
  Exclude:
    - test/*


M app/jobs/sync_assigned_orders_job.rb => app/jobs/sync_assigned_orders_job.rb +1 -0
@@ 40,6 40,7 @@ class SyncAssignedOrdersJob < ApplicationJob
			service.location_id == fulfillment_order.assigned_location_id
		}
		service = FulfillmentService.find_by!(shopify_id: shopify_service&.id)
		return unless service.shop_id == shop.id

		inventory_items = ShopifyAPI::InventoryItem.all(
			ids: fulfillment_order.line_items.map { |li| li["inventory_item_id"].to_s }.join(",")