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

Make CREATE_MISSING_FLAGS logic universal (#400) #427

Merged
merged 1 commit into from
Mar 3, 2022

Conversation

honzakral
Copy link
Contributor

Before CREATE_MISSING_FLAGS was only respected when is_active(request) method was used, now any check against a flag (calling get(name)) will trigger the automatic creation of the Flag model.

Fixes #400

Copy link
Collaborator

@clintonb clintonb left a comment

Choose a reason for hiding this comment

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

@honzakral thanks for the speedy work. Can you add a test for this functionality?

@honzakral honzakral force-pushed the create-missing-flag branch from fff498f to 35ba0e6 Compare March 3, 2022 15:11
Before CREATE_MISSING_FLAGS was only respected when `is_active(request)`
method was used, now any check against a flag (calling `get(name)`) will
trigger the automatic creation of the `Flag` model.
@honzakral
Copy link
Contributor Author

@clintonb most of it was covered by existing tests so I just added a simple test that bypasses the current flow and would fail without the patch, hope that helps. If there is any other test you'd like to see I am happy to add it.

@clintonb clintonb merged commit 947195b into jazzband:master Mar 3, 2022
@honzakral honzakral deleted the create-missing-flag branch March 3, 2022 18:05
clintonb added a commit that referenced this pull request Mar 28, 2022
clintonb added a commit that referenced this pull request Mar 28, 2022
honzakral added a commit to honzakral/django-waffle that referenced this pull request Mar 28, 2022
Before CREATE_MISSING_FLAGS was only respected when `is_active(request)` method was used, now any check against a flag (calling `get(name)`) will trigger the automatic creation of the `Flag` model.
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.

CREATE_MISSING_FLAGS should be handled in .get() instead of is_active()
2 participants