mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-26 01:33:22 +00:00
Replace literal with AR's 4 #not
This commit is contained in:
@@ -187,7 +187,7 @@ module Spree
|
||||
# Makes newly entered payments invalidate previously entered payments so the most recent payment
|
||||
# is used by the gateway.
|
||||
def invalidate_old_payments
|
||||
order.payments.with_state('checkout').where("id != ?", id).each do |payment|
|
||||
order.payments.with_state('checkout').where.not(id: id).each do |payment|
|
||||
# Using update_column skips validations and so it skips validate_source. As we are just
|
||||
# invalidating past payments here, we don't want to validate all of them at this stage.
|
||||
payment.update_column(:state, 'invalid')
|
||||
|
||||
Reference in New Issue
Block a user