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 boolean breakdown on postgres #3752

Merged
merged 2 commits into from Mar 26, 2021
Merged

Fix boolean breakdown on postgres #3752

merged 2 commits into from Mar 26, 2021

Conversation

EDsCODE
Copy link
Member

@EDsCODE EDsCODE commented Mar 25, 2021

Changes

Please describe.

  • previously, boolean values on breakdown weren't labeled correctly. False values were defaulting to "other"

If this affects the frontend, include screenshots.

Checklist

  • All querysets/queries filter by Organization, by Team, and by User
  • Django backend tests
  • Jest frontend tests
  • Cypress end-to-end tests

@EDsCODE EDsCODE requested review from macobo and timgl March 25, 2021 19:55
@timgl timgl temporarily deployed to posthog-pr-3752 March 25, 2021 20:03 Inactive
entity.name, value if value and value != "None" and value != "nan" else "Other",
)
ret_dict["breakdown_value"] = value if value else None
label = value if (value or type(value) == bool) and value != "None" and value != "nan" else "Other"
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this is worth unit testing separately, wdyt?

@EDsCODE EDsCODE temporarily deployed to posthog-pr-3752 March 26, 2021 15:13 Inactive
@EDsCODE EDsCODE merged commit d628a23 into master Mar 26, 2021
@EDsCODE EDsCODE deleted the pg-breakdown-bools branch March 26, 2021 20:46
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.

None yet

3 participants