Skip to content

Resolve /decide endpoint errors due to invalid token#4772

Merged
neilkakkar merged 7 commits intomasterfrom
decidefix
Jun 16, 2021
Merged

Resolve /decide endpoint errors due to invalid token#4772
neilkakkar merged 7 commits intomasterfrom
decidefix

Conversation

@neilkakkar
Copy link
Copy Markdown
Contributor

@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.

@neilkakkar neilkakkar requested a review from buwilliams June 16, 2021 09:23
@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
@timgl timgl temporarily deployed to posthog-pr-4772 June 16, 2021 11:01 Inactive
Copy link
Copy Markdown
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
Copy Markdown
Contributor Author

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

Copy link
Copy Markdown
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