mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-04-01 06:41:41 +00:00
Fix some rubocop issues
This commit is contained in:
@@ -14,7 +14,8 @@ class Api::Admin::ForOrderCycle::SuppliedProductSerializer < ActiveModel::Serial
|
||||
end
|
||||
|
||||
def variants
|
||||
variants = if order_cycle.present? && order_cycle.prefers_product_selection_from_coordinator_inventory_only?
|
||||
variants = if order_cycle.present? &&
|
||||
order_cycle.prefers_product_selection_from_coordinator_inventory_only?
|
||||
object.variants.visible_for(order_cycle.coordinator)
|
||||
else
|
||||
object.variants
|
||||
|
||||
@@ -41,7 +41,9 @@ class ExchangeProductsRenderer
|
||||
@incoming_exchanges_variants = []
|
||||
visible_incoming_exchanges.each do |incoming_exchange|
|
||||
@incoming_exchanges_variants.push(
|
||||
*incoming_exchange.variants.merge(visible_incoming_variants(incoming_exchange.sender)).map(&:id).to_a
|
||||
*incoming_exchange.variants.merge(
|
||||
visible_incoming_variants(incoming_exchange.sender)
|
||||
).map(&:id).to_a
|
||||
)
|
||||
end
|
||||
@incoming_exchanges_variants
|
||||
|
||||
Reference in New Issue
Block a user