Merge branch 'master' into main
This commit is contained in:
@@ -51,7 +51,10 @@ def getAuctionlocations(countrycode: Countrycode, clearcache:bool = False):
|
|||||||
|
|
||||||
for auction in auctions:
|
for auction in auctions:
|
||||||
auction.geonamelocation = getGeoLocationByCity(auction.city, countrycode)
|
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)
|
geonameids = map(get_geonameid, auctions)
|
||||||
uniquegeonameids = (list(set(geonameids)))
|
uniquegeonameids = (list(set(geonameids)))
|
||||||
|
|
||||||
@@ -59,6 +62,7 @@ def getAuctionlocations(countrycode: Countrycode, clearcache:bool = False):
|
|||||||
|
|
||||||
#loops through the uniques geonameids
|
#loops through the uniques geonameids
|
||||||
for geoid in uniquegeonameids:
|
for geoid in uniquegeonameids:
|
||||||
|
|
||||||
#filters all auctions for this geonameid
|
#filters all auctions for this geonameid
|
||||||
geoauctions = list(filter(lambda a: get_geonameid(a) == geoid , auctions))
|
geoauctions = list(filter(lambda a: get_geonameid(a) == geoid , auctions))
|
||||||
if(geoauctions):
|
if(geoauctions):
|
||||||
@@ -82,6 +86,3 @@ def get_geonameid(auction):
|
|||||||
return auction.geonamelocation.geonameid
|
return auction.geonamelocation.geonameid
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user