Skip to content

Conversation

@fpacifici
Copy link
Contributor

When I merged master I forgot to remove the duplicate Event type. Now there is only one and it has the right structure.

@fpacifici fpacifici requested a review from a team as a code owner August 4, 2020 23:45
data = event.get("data", {})
user_dict = data.get("user", data.get("sentry.interfaces.User", None)) or {}

user_dict = data.get("user", data.get("user", None)) or {}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
user_dict = data.get("user", data.get("user", None)) or {}
user_dict = data.get("user") or {}

data = event.get("data", {})
user_dict = data.get("user", data.get("sentry.interfaces.User", None)) or {}

user_dict = data.get("user", data.get("user", None)) or {}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was this intentional?

The first version had a fallback to what appears to be an alternate key. This version checks for the same key twice.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, this is a mistake. Will revert

@fpacifici fpacifici merged commit f5823b2 into wip/jsonschema-mypy Aug 5, 2020
@fpacifici fpacifici deleted the fix/correct_path branch August 5, 2020 17:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants