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:
Maikel Linke
2024-09-20 16:35:41 +10:00
parent f6e4b107b0
commit 2be8ef96be

View File

@@ -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