Face palm - fix mktcap sorting

Yuh think maybe the default "null" value shouldn't be a string...?

Fixes #46
kivy_mainline_and_py3.8
Tyler Goodlet 2018-08-22 22:49:42 -04:00
parent b2acfdaf42
commit 421cc4731f
1 changed files with 1 additions and 1 deletions

View File

@ -403,7 +403,7 @@ def format_quote(
previous = symbol_data[symbol]['prevDayClosePrice'] previous = symbol_data[symbol]['prevDayClosePrice']
change = percent_change(previous, last) change = percent_change(previous, last)
share_count = symbol_data[symbol].get('outstandingShares', None) share_count = symbol_data[symbol].get('outstandingShares', None)
mktcap = share_count * last if (last and share_count) else 'NA' mktcap = share_count * last if (last and share_count) else 0
computed = { computed = {
'symbol': quote['symbol'], 'symbol': quote['symbol'],
'%': round(change, 3), '%': round(change, 3),