mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-04-02 06:51:40 +00:00
Fix duplicate branch in Enterprise#category method
non_producer_sells_any and non_producer_sells_own have the same category
This commit is contained in:
@@ -28,7 +28,7 @@ Lint/ConstantDefinitionInBlock:
|
||||
Lint/DuplicateBranch:
|
||||
Exclude:
|
||||
# - 'app/helpers/spree/admin/base_helper.rb'
|
||||
- 'app/models/enterprise.rb'
|
||||
# - 'app/models/enterprise.rb'
|
||||
- 'app/models/spree/calculator.rb'
|
||||
- 'app/models/spree/preference.rb'
|
||||
- 'app/models/spree/preferences/preferable.rb'
|
||||
|
||||
@@ -369,10 +369,10 @@ class Enterprise < ApplicationRecord
|
||||
:producer_shop # Producer with shopfront and supplies other hubs.
|
||||
when "producer_sells_none"
|
||||
:producer # Producer only supplies through others.
|
||||
when "non_producer_sells_any"
|
||||
:hub # Hub selling others products in order cycles.
|
||||
when "non_producer_sells_own"
|
||||
:hub # Wholesaler selling through own shopfront? Does this need a separate name or even exist?
|
||||
when "non_producer_sells_any", "non_producer_sells_own"
|
||||
# Hub selling others products in order cycles
|
||||
# Or Wholesaler selling through own shopfront? Does this need a separate name or even exist?
|
||||
:hub
|
||||
when "non_producer_sells_none"
|
||||
:hub_profile # Hub selling outside the system.
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user