From 27fb2c344ade09dcb6f11403a23e8b7d02ffb5a3 Mon Sep 17 00:00:00 2001 From: "E. Almqvist" Date: Sun, 24 Apr 2022 17:09:26 +0200 Subject: [PATCH] Minor SQL bug fix --- src/lib/db_models.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/db_models.rb b/src/lib/db_models.rb index 96f5ca0..e8c27fb 100644 --- a/src/lib/db_models.rb +++ b/src/lib/db_models.rb @@ -461,7 +461,7 @@ class Bid < EntityModel end def self.get_delta_amount(ahid, uid, amount) - data = self.get "*", "auction_id = ?, user_id = ?", ahid, uid + data = self.get "*", "auction_id = ? AND user_id = ?", ahid, uid if data then data.map! {|dat| self.new(dat)} max_bid = data.max_by {|bid| bid.amount}