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

[WIP] Create missing model (Switch/Flag/Sample) in get_from_db #438

Closed
wants to merge 2 commits into from

Conversation

honzakral
Copy link
Contributor

Fixes #400

In my previous PR (#427) I made a mistake of ignoring Switch and Sample objects and just moving logic specific to Flag to BaseModel. This PR attempts a more generic solution that should work for all the mentioned models.

Marked as WIP due to missing tests

honzakral and others added 2 commits March 29, 2022 01:31
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
Copy link
Collaborator

Rebase and add tests when ready for review.

@clintonb clintonb closed this Jul 20, 2022
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