fix enterprsie model logic

This commit is contained in:
Rafael Schouten
2014-09-26 14:48:37 +10:00
committed by Rob Harrington
parent dee503befb
commit e9c8547ca3

View File

@@ -215,7 +215,7 @@ class Enterprise < ActiveRecord::Base
# Type: full - single - profile becomes Sells: all - own - none
# Remove this return later.
return "none" if !is_distributor || type == "profile"
return "own" if suppliers == [self] || type == "single"
return "own" if type == "single" || suppliers == [self]
"all"
end