Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(hackweek): Use the correct event Typed Dict in event processor base. #1201

Merged
merged 2 commits into from
Aug 5, 2020

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
@@ -46,8 +46,7 @@ def extract_custom(
metadata: KafkaMessageMetadata,
) -> None:
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 {}

@@ -46,8 +46,7 @@ def extract_custom(
metadata: KafkaMessageMetadata,
) -> None:
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.

3 participants