jazzband / django-waffle

A feature flipper for Django
https://waffle.readthedocs.io
BSD 3-Clause "New" or "Revised" License
1.12k stars 258 forks source link

Make CREATE_MISSING_FLAGS logic universal (#400) #427

Closed honzakral closed 2 years ago

honzakral commented 2 years ago

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

honzakral commented 2 years ago

@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.