-
-
Notifications
You must be signed in to change notification settings - Fork 258
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
CREATE_MISSING_FLAGS should be handled in .get() instead of is_active() #400
Comments
I have same issue. The solution suggested by @honzakral seems reasonable. Is there any interest in such a PR? |
Yes, PRs are welcome. |
honzakral
added a commit
to honzakral/django-waffle
that referenced
this issue
Mar 2, 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.
honzakral
added a commit
to honzakral/django-waffle
that referenced
this issue
Mar 3, 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.
clintonb
pushed a commit
that referenced
this issue
Mar 3, 2022
clintonb
added a commit
that referenced
this issue
Mar 28, 2022
This feature was reverted. See #435 for some details. Please modify the logic to ensure it supports flags, switches, and samples. |
honzakral
added a commit
to honzakral/django-waffle
that referenced
this issue
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
I am using the Flags in other scenarios aside from just views (celery tasks for example) and I was surprised that the
CREATE_MISSING_FLAGS
setting wasn't respected (I am manually callingis_active_for_user
and other, custom, methods I created based on the example) and the methods were failing with error:In my mind there should be a way to check if a flag is active using similar mechanism to
waffle.flag_is_active
which would work and respect theCREATE_MISSING_FLAGS
setting, simplest solution seems to move the logic fromis_active
toget()
. I would be happy to submit a PR if this would be considered a useful addition.The text was updated successfully, but these errors were encountered: