You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This was surprising to me – is_active_for_user() is exposed as a public API function, so I thought it would handle flag.everyone, but it doesn't respect that setting. That makes sense to me for _is_active_for_user() (which happens after the check on .everyone in is_active(), but makes for unexpected behavior when trying to use flags outside of a request context (where is_active_for_user() feels like the right API to use...
I would expect there to be a simple way to check if a flag is active without a request (e.g. in a celery task) but instead I have to ensure that I check the .everyone field separately. Is this intended? Could the API be changed so that is_active_for_user() resepects .everyone?
The text was updated successfully, but these errors were encountered:
This was surprising to me –
is_active_for_user()
is exposed as a public API function, so I thought it would handleflag.everyone
, but it doesn't respect that setting. That makes sense to me for_is_active_for_user()
(which happens after the check on.everyone
inis_active()
, but makes for unexpected behavior when trying to use flags outside of a request context (whereis_active_for_user()
feels like the right API to use...I would expect there to be a simple way to check if a flag is active without a request (e.g. in a celery task) but instead I have to ensure that I check the
.everyone
field separately. Is this intended? Could the API be changed so thatis_active_for_user()
resepects.everyone
?The text was updated successfully, but these errors were encountered: