From 05b272444fc2124908641cb3ad67328292d73a9a Mon Sep 17 00:00:00 2001 From: Manuel Simon Hirsig Date: Mon, 22 Feb 2016 16:06:23 +0100 Subject: [PATCH] sorting fix --- auction_listing.lua | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/auction_listing.lua b/auction_listing.lua index 031679e..34ff5fe 100644 --- a/auction_listing.lua +++ b/auction_listing.lua @@ -302,8 +302,13 @@ local methods = { aVal = self:GetRecordPercent(record_a) bVal = self:GetRecordPercent(record_b) elseif sortKey == 'numAuctions' then - aVal = a.totalAuctions - bVal = b.totalAuctions + if a.children then + aVal = a.totalAuctions + bVal = b.totalAuctions + else + aVal = a.numAuctions + bVal = b.numAuctions + end elseif sortKey == 'unit_bid_price' or sortKey == 'bid_price' then aVal = self.GetRowPrices(record_a, sortKey == 'unit_bid_price') bVal = self.GetRowPrices(record_b, sortKey == 'unit_bid_price')