Skip to content

Commit

Permalink
Merge pull request matthewgilbert#8 from Quantitas-Gestao-de-Recursos…
Browse files Browse the repository at this point in the history
…/master

Fix for bds collector with empty data
  • Loading branch information
matthewgilbert authored Jan 9, 2022
2 parents 8590f7e + 31604a4 commit 5cbbe47
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/blp/blp.py
Original file line number Diff line number Diff line change
Expand Up @@ -886,9 +886,10 @@ def collect_many_to_bds(self, responses) -> Dict:
sec_dict = res.get(security, {})
for field in response["data"]:
data = response["data"][field]
rows = sec_dict.get(field, [])
rows.extend(data)
sec_dict[field] = rows
if data:
rows = sec_dict.get(field, [])
rows.extend(data)
sec_dict[field] = rows
res[security] = sec_dict
for s in res:
for f in res[s]:
Expand Down

0 comments on commit 5cbbe47

Please sign in to comment.