Skip to content

Commit

Permalink
comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Lior539 committed Sep 17, 2024
1 parent 77f5aad commit c73c4c5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions posthog/tasks/usage_report.py
Original file line number Diff line number Diff line change
Expand Up @@ -699,8 +699,10 @@ def convert_team_usage_rows_to_dict(rows: list[Union[dict, tuple[int, int]]]) ->
team_id_map = {}
for row in rows:
if isinstance(row, dict) and "team_id" in row:
# Some queries return a dict with team_id and total
team_id_map[row["team_id"]] = row["total"]
else:
# Others are just a tuple with team_id and total
team_id_map[int(row[0])] = row[1]
return team_id_map

Expand Down

0 comments on commit c73c4c5

Please sign in to comment.