Skip to content

Commit

Permalink
fix(dhis2): ignore chunks without data values
Browse files Browse the repository at this point in the history
  • Loading branch information
yannforget committed May 27, 2024
1 parent 82263d2 commit fd0623e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion openhexa/toolbox/dhis2/dhis2.py
Original file line number Diff line number Diff line change
Expand Up @@ -637,7 +637,9 @@ def get(
response = []
for chunk in chunks:
r = self.client.api.get("dataValueSets", params=chunk)
response += r.json()["dataValues"]
r_json = r.json()
if "dataValues" in r_json:
response += r.json()["dataValues"]

return response

Expand Down

0 comments on commit fd0623e

Please sign in to comment.