fixed filtering out bankrupt users from !richest

This commit is contained in:
jesopo 2018-08-10 12:59:06 +01:00
parent 922ff5ac84
commit b24e37fed6

View file

@ -44,7 +44,8 @@ class Module(object):
def richest(self, event): def richest(self, event):
all_coins = event["server"].get_all_user_settings("coins", []) all_coins = event["server"].get_all_user_settings("coins", [])
all_coins = list(filter(lambda coin: coin[1], all_coins)) all_coins = list(filter(lambda coin: decimal.Decimal(coin[1]),
all_coins))
items = [(coin[0], decimal.Decimal(coin[1])) for coin in all_coins] items = [(coin[0], decimal.Decimal(coin[1])) for coin in all_coins]
all_coins = dict(items) all_coins = dict(items)