bugfixing

This commit is contained in:
MuslemRahimi 2024-11-29 09:49:03 +01:00
parent a212a36142
commit 286f5b3e2e
2 changed files with 4 additions and 3 deletions

View File

@ -34,7 +34,7 @@ aws_secret_access_key = os.getenv('AWS_SECRET_ACCESS_KEY')
berlin_tz = pytz.timezone('Europe/Berlin')
pb = PocketBase('http://127.0.0.1:8090')
admin_data = pb.admins.auth_with_password(pb_admin_email, pb_password)
admin_data = pb.collection('_superusers').auth_with_password(pb_admin_email, pb_password)
#Send price alert via email

View File

@ -1280,7 +1280,7 @@ async def get_watchlist(data: GetWatchList, api_key: str = Security(get_api_key)
# Categorize tickers and fetch data
for ticker in map(str.upper, ticker_list):
ticker_type = 'stock'
ticker_type = 'stocks'
if ticker in etf_symbols:
ticker_type = 'etf'
elif ticker in crypto_symbols:
@ -1296,7 +1296,8 @@ async def get_watchlist(data: GetWatchList, api_key: str = Security(get_api_key)
# Load news data
news_dict = load_json(f"json/market-news/companies/{ticker}.json")
if news_dict:
combined_news.append(news_dict[0])
combined_news.extend(news_dict[:2])
try:
# Filter out the keys that need to be fetched from the screener