From c73c4c550ba0db5c789ea519aaf7c183fae38ce7 Mon Sep 17 00:00:00 2001 From: Lior Date: Tue, 17 Sep 2024 10:44:56 +0100 Subject: [PATCH] comments --- posthog/tasks/usage_report.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/posthog/tasks/usage_report.py b/posthog/tasks/usage_report.py index f392e58e02d9c..ce4dd8628f10e 100644 --- a/posthog/tasks/usage_report.py +++ b/posthog/tasks/usage_report.py @@ -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