From 31604a49f8c4c42652716d68b684b41f32c3d3b3 Mon Sep 17 00:00:00 2001 From: Rafael Elter Date: Thu, 25 Nov 2021 14:44:24 -0300 Subject: [PATCH] collect_many_bds empty data --- src/blp/blp.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/blp/blp.py b/src/blp/blp.py index 7ace55a..0ac26f9 100644 --- a/src/blp/blp.py +++ b/src/blp/blp.py @@ -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]: