mirror of
https://github.com/hydrosquall/tiingo-python.git
synced 2025-12-18 04:14:20 +01:00
Update get_news() to work when no sources are provided.
Currently, `sources=[]` by default, which will become "" once the list is `joined` to form a csv string. The tiingo api appears to interpret the empty string as "don't match any sources" instead of "match all sources". This commit fixes the problem by setting `sources` to `None` if the list is empty. Adds unit test for empty new sources list. Updates HISTORY.rst with note about bug fix.
This commit is contained in:
committed by
DavidMinnen
parent
f6ef473b0d
commit
aed36edb65
@@ -338,7 +338,7 @@ class TiingoClient(RestClient):
|
||||
'offset': offset,
|
||||
'sortBy': sortBy,
|
||||
'tickers': tickers,
|
||||
'source': (",").join(sources),
|
||||
'source': (",").join(sources) if sources else None,
|
||||
'tags': tags,
|
||||
'startDate': startDate,
|
||||
'endDate': endDate,
|
||||
|
||||
Reference in New Issue
Block a user