Skip to content

Commit

Permalink
fix: fixes double append of indicators (#79)
Browse files Browse the repository at this point in the history
  • Loading branch information
nazarfil authored Dec 31, 2024
1 parent cfa543d commit 4fae1e0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions openhexa/toolbox/dhis2/dhis2.py
Original file line number Diff line number Diff line change
Expand Up @@ -263,9 +263,9 @@ def indicators(self, fields: str = "id,name,numerator,denominator", filter: str
"indicators",
params=params,
):
fields_list = fields.split(",")
for indicator in page["indicators"]:
indicators.append({key: indicator.get(key) for key in fields.split(",")})
indicators += page["indicators"]
indicators.append({key: indicator.get(key) for key in fields_list})
return indicators

def indicator_groups(self, fields: str = "id,name,indicators") -> List[dict]:
Expand Down

0 comments on commit 4fae1e0

Please sign in to comment.