Skip to content
This repository has been archived by the owner on Jul 25, 2024. It is now read-only.

Commit

Permalink
Filter out email_address key as that was breaking reporting
Browse files Browse the repository at this point in the history
  • Loading branch information
gidsg committed Jul 23, 2024
1 parent 3763709 commit 7a80b8f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion scripts/extract_download_logs.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,13 @@ def parse_item(item: List[dict]) -> dict:
user_id = message["user_id"]
email = message.get("email")
query_params = message.get("query_params", {})
query_params_without_email_address = {k: v for k, v in query_params.items() if k != "email_address"}
timestamp = [i for i in item if i["field"] == "@timestamp"][0]["value"]
return {
"timestamp": timestamp,
"user_id": user_id,
"email": email,
**query_params,
**query_params_without_email_address,
}

return [parse_item(item) for item in data]
Expand Down

0 comments on commit 7a80b8f

Please sign in to comment.