Skip to content

Library does not properly handle feature flags with no % rollout #24

@paolodamico

Description

@paolodamico

See sentry issue https://sentry.io/organizations/posthog/issues/2220836956/?project=1899813. If a feature flag is enabled for everyone without a % rollout, the client crashes. Notice that this is different from a 100% rollout which works fine.

unsupported operand type(s) for /: 'NoneType' and 'int'

posthoganalytics/client.py#L276

response = _hash(key, distinct_id) <= (feature_flag['rollout_percentage'] / 100)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions