Minor SQL bug fix

master
E. Almqvist 3 years ago
parent 90bdfa33a7
commit 27fb2c344a
  1. 2
      src/lib/db_models.rb

@ -461,7 +461,7 @@ class Bid < EntityModel
end end
def self.get_delta_amount(ahid, uid, amount) 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 if data then
data.map! {|dat| self.new(dat)} data.map! {|dat| self.new(dat)}
max_bid = data.max_by {|bid| bid.amount} max_bid = data.max_by {|bid| bid.amount}

Loading…
Cancel
Save