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

Resolve /decide endpoint errors due to invalid token #4772

Merged
merged 7 commits into from
Jun 16, 2021
Merged

Conversation

neilkakkar
Copy link
Collaborator

@neilkakkar neilkakkar commented Jun 16, 2021

Changes

Fixes #4712

The problem was just a missing check for token being None, but I refactored this code a bit to ensure we don't have to remember to check this, if we use get_token anywhere in the future.

Checklist

  • All querysets/queries filter by Organization, by Team, and by User
  • Django backend tests
  • Jest frontend tests
  • Cypress end-to-end tests
  • Migrations are safe to run at scale (e.g. PostHog Cloud) – present proof if not obvious
  • Frontend/CSS is usable at 320px (iPhone SE) and decent at 360px (most phones)
  • Breaking changes are backwards-compatible. Ensure old/new frontend requests work with new/old backends, and vice versa.

@timgl timgl temporarily deployed to posthog-pr-4772 June 16, 2021 09:27 Inactive
@neilkakkar neilkakkar requested a review from macobo June 16, 2021 09:30
@timgl timgl temporarily deployed to posthog-pr-4772 June 16, 2021 09:33 Inactive
posthog/api/capture.py Outdated Show resolved Hide resolved
@timgl timgl temporarily deployed to posthog-pr-4772 June 16, 2021 11:01 Inactive
Copy link
Contributor

@macobo macobo left a comment

Choose a reason for hiding this comment

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

Nice, clean fix. Good job!

@neilkakkar
Copy link
Collaborator Author

Failing Cypress test seems flakey. Re-running again to see if it passes soon.

Copy link
Contributor

@buwilliams buwilliams left a comment

Choose a reason for hiding this comment

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

lgtm

@timgl timgl temporarily deployed to posthog-pr-4772 June 16, 2021 13:40 Inactive
@timgl timgl temporarily deployed to posthog-pr-4772 June 16, 2021 14:00 Inactive
@neilkakkar neilkakkar enabled auto-merge (squash) June 16, 2021 14:08
@neilkakkar neilkakkar merged commit 4080c5a into master Jun 16, 2021
@neilkakkar neilkakkar deleted the decidefix branch June 16, 2021 14:10
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.

/decide endpoint failure due to test tokens
4 participants