mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-27 01:43:22 +00:00
Use if exclude instead of if !include in OrderCycleForm
Co-authored-by: Maikel <maikel@email.org.au>
This commit is contained in:
committed by
Filipe
parent
ad51b41bb3
commit
8b59b7a796
@@ -39,7 +39,7 @@ class OrderCycleForm
|
||||
|
||||
def add_exception_to_order_cycle_errors(exception)
|
||||
error = exception.message.split(":").last.strip
|
||||
order_cycle.errors.add(:base, error) if !order_cycle.errors.to_a.include?(error)
|
||||
order_cycle.errors.add(:base, error) if order_cycle.errors.to_a.exclude?(error)
|
||||
end
|
||||
|
||||
def apply_exchange_changes
|
||||
|
||||
Reference in New Issue
Block a user