mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-27 21:06:49 +00:00
Order cycle can have the same enterprise participating as supplier, coordinator and distributor
This commit is contained in:
@@ -11,7 +11,7 @@ class Exchange < ActiveRecord::Base
|
||||
has_many :enterprise_fees, :through => :exchange_fees
|
||||
|
||||
validates_presence_of :order_cycle, :sender, :receiver
|
||||
validates_uniqueness_of :sender_id, :scope => [:order_cycle_id, :receiver_id]
|
||||
validates_uniqueness_of :sender_id, :scope => [:order_cycle_id, :receiver_id, :incoming]
|
||||
|
||||
accepts_nested_attributes_for :variants
|
||||
|
||||
|
||||
Reference in New Issue
Block a user