Adder filter to have lots

This commit is contained in:
Computerboer
2025-07-30 23:48:48 +02:00
committed by GitHub
parent 41795462fb
commit 9a67af7480

View File

@@ -37,7 +37,10 @@ def getAuctionlocations(countrycode: Countrycode):
for auction in auctions:
auction.geonamelocation = getGeoLocationByCity(auction.city, countrycode)
#filters all auctions for this geonameid
auctions = list(filter(lambda a: a.numberoflots > 0 , auctions))
geonameids = map(get_geonameid, auctions)
uniquegeonameids = (list(set(geonameids)))
@@ -45,6 +48,7 @@ def getAuctionlocations(countrycode: Countrycode):
#loops through the uniques geonameids
for geoid in uniquegeonameids:
#filters all auctions for this geonameid
geoauctions = list(filter(lambda a: get_geonameid(a) == geoid , auctions))
if(geoauctions):
@@ -179,4 +183,4 @@ def getOVMAuctions():
else:
log("The OVM auctions call didn't gave a 200 response but a " + str(response.status_code) + ". With the reason: " + response.reason)
return []
return []