Skip to content

Commit

Permalink
fix issue when no players are on the market
Browse files Browse the repository at this point in the history
  • Loading branch information
hunterjm committed Dec 3, 2015
1 parent 5d12ded commit 14bc868
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/watch.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ def lowestBin(q, api, defIds):
if not isinstance(defIds, (list, tuple)):
defIds = (defIds,)

def find(api, defId, buy=None, num=0):
def find(api, defId, buy=0, num=0):
lowest = buy
items = api.searchAuctions('player', defId=defId, max_buy=buy, page_size=50)
if items:
Expand All @@ -17,7 +17,7 @@ def find(api, defId, buy=None, num=0):
# If we have 50 of the same result, go one lower
if num == 50:
lowest -= decrement(lowest)
if buy is None or lowest < buy:
if buy == 0 or lowest < buy:
return find(api, defId, lowest, num)
return (lowest, num)

Expand Down

0 comments on commit 14bc868

Please sign in to comment.