From 774cec78cfddf5e3f4175b68c54e1587765f535d Mon Sep 17 00:00:00 2001 From: MuslemRahimi Date: Fri, 27 Dec 2024 09:05:01 +0100 Subject: [PATCH] bugfixing by removing symbols with - --- app/create_stock_db.py | 2 ++ app/main.py | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/app/create_stock_db.py b/app/create_stock_db.py index fe6eab3..bf5bd08 100755 --- a/app/create_stock_db.py +++ b/app/create_stock_db.py @@ -351,6 +351,8 @@ async def fetch_tickers(): db = StockDatabase('backup_db/stocks.db') loop = asyncio.get_event_loop() all_tickers = loop.run_until_complete(fetch_tickers()) + +all_tickers = [item for item in all_tickers if '-' not in item['symbol'] or item['symbol'] in ['BRK-A', 'BRK-B']] #all_tickers = [item for item in all_tickers if item['symbol'] == 'ZJK'] ''' existing_names = set() diff --git a/app/main.py b/app/main.py index 17f2b90..d3140ed 100755 --- a/app/main.py +++ b/app/main.py @@ -1863,7 +1863,6 @@ async def get_stock( 0 if item.get('marketCap') is None else -item['marketCap'] ) )[:5] - return JSONResponse(content=orjson.loads(orjson.dumps(results)))