From 571a18e4aa1a5ffddf7c83738cbe92cd3ab699ff Mon Sep 17 00:00:00 2001 From: Computerboer Date: Sun, 9 Jul 2023 21:45:58 +0200 Subject: [PATCH] added sorting of auctions by closingdatetime --- utils/auctionutils.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/utils/auctionutils.py b/utils/auctionutils.py index ca4a538..a81d41f 100644 --- a/utils/auctionutils.py +++ b/utils/auctionutils.py @@ -84,7 +84,9 @@ def getOVMAuctions(): for result in data['veilingen']: cityname ="Nederland" if result['isBezorgVeiling'] else result['afgifteAdres']['plaats'] cityname = "Nederland" if cityname is None else cityname #there can be auctions where you have to make an appointment to retrieve the lots - a = Auction(Auctionbrand.OVM, cityname,result['land'], result['naam'],result['openingsDatumISO'], result['sluitingsDatumISO'], str(result['land']).lower() + '/veilingen/' + str(result['id']) + '/kavels', 'images/150x150/' + str(result['id']) + '/' + result['image'], result['totaalKavels'] ) + startdatetime = result['openingsDatumISO'].replace("T", " ").replace("Z", "") + enddatetime = result['sluitingsDatumISO'].replace("T", " ").replace("Z", "") + a = Auction(Auctionbrand.OVM, cityname,result['land'], result['naam'],startdatetime, enddatetime, str(result['land']).lower() + '/veilingen/' + str(result['id']) + '/kavels', 'images/150x150/' + str(result['id']) + '/' + result['image'], result['totaalKavels'] ) auctions.append(a) Cache.add(cachename, auctions) return auctions