mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
Remove unreachable code
These two methods return early if `active` is falsey. So for the rest of the method we can assume `active` to be truthy.
This commit is contained in:
@@ -95,9 +95,7 @@ module Api
|
||||
.merge(Exchange.to_enterprise(enterprise))
|
||||
.select('DISTINCT spree_properties.*')
|
||||
|
||||
return properties.merge(OrderCycle.active) if active
|
||||
|
||||
properties
|
||||
properties.merge(OrderCycle.active)
|
||||
end
|
||||
|
||||
def distributed_producer_properties
|
||||
@@ -113,9 +111,7 @@ module Api
|
||||
.merge(Exchange.to_enterprise(enterprise))
|
||||
.select('DISTINCT spree_properties.*')
|
||||
|
||||
return properties.merge(OrderCycle.active) if active
|
||||
|
||||
properties
|
||||
properties.merge(OrderCycle.active)
|
||||
end
|
||||
|
||||
def active
|
||||
|
||||
Reference in New Issue
Block a user