Skip to content

Commit 14bc868

Browse files
committed
fix issue when no players are on the market
1 parent 5d12ded commit 14bc868

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

core/watch.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ def lowestBin(q, api, defIds):
88
if not isinstance(defIds, (list, tuple)):
99
defIds = (defIds,)
1010

11-
def find(api, defId, buy=None, num=0):
11+
def find(api, defId, buy=0, num=0):
1212
lowest = buy
1313
items = api.searchAuctions('player', defId=defId, max_buy=buy, page_size=50)
1414
if items:
@@ -17,7 +17,7 @@ def find(api, defId, buy=None, num=0):
1717
# If we have 50 of the same result, go one lower
1818
if num == 50:
1919
lowest -= decrement(lowest)
20-
if buy is None or lowest < buy:
20+
if buy == 0 or lowest < buy:
2121
return find(api, defId, lowest, num)
2222
return (lowest, num)
2323

0 commit comments

Comments
 (0)