Sha256: ad2edae9e01ce12cce4ed57f2b1d20560b3b855942de759b068a618fad629821

Contents?: true

Size: 290 Bytes

Versions: 62

Compression:

Stored size: 290 Bytes

Contents

module Workarea
  class Lint
    class ProductsMissingVariants < Lint
      def run
        Catalog::Product
          .any_of({ variants: nil }, { variants: [] })
          .each_by(100) do |product|
            error("#{product.id},No variants")
          end
      end
    end
  end
end

Version data entries

62 entries across 62 versions & 1 rubygems

Version Path
workarea-core-3.5.27 lib/workarea/lint/products_missing_variants.rb
workarea-core-3.5.26 lib/workarea/lint/products_missing_variants.rb
workarea-core-3.4.45 lib/workarea/lint/products_missing_variants.rb
workarea-core-3.5.25 lib/workarea/lint/products_missing_variants.rb
workarea-core-3.5.23 lib/workarea/lint/products_missing_variants.rb
workarea-core-3.4.44 lib/workarea/lint/products_missing_variants.rb
workarea-core-3.5.22 lib/workarea/lint/products_missing_variants.rb
workarea-core-3.4.43 lib/workarea/lint/products_missing_variants.rb
workarea-core-3.5.21 lib/workarea/lint/products_missing_variants.rb
workarea-core-3.4.42 lib/workarea/lint/products_missing_variants.rb
workarea-core-3.5.20 lib/workarea/lint/products_missing_variants.rb
workarea-core-3.4.41 lib/workarea/lint/products_missing_variants.rb
workarea-core-3.5.19 lib/workarea/lint/products_missing_variants.rb
workarea-core-3.4.40 lib/workarea/lint/products_missing_variants.rb
workarea-core-3.5.18 lib/workarea/lint/products_missing_variants.rb
workarea-core-3.4.39 lib/workarea/lint/products_missing_variants.rb
workarea-core-3.5.17 lib/workarea/lint/products_missing_variants.rb
workarea-core-3.4.38 lib/workarea/lint/products_missing_variants.rb
workarea-core-3.5.16 lib/workarea/lint/products_missing_variants.rb
workarea-core-3.4.37 lib/workarea/lint/products_missing_variants.rb