cfpb / django-flags

Feature flags for Django projects
https://cfpb.github.io/django-flags/
Creative Commons Zero v1.0 Universal
260 stars 32 forks source link

Bind condition choices when admin form is created #4

Closed callorico closed 6 years ago

callorico commented 6 years ago

Previously, the FlagStateForm condition choices were bound when the module was loaded. It is possible for this happen before custom conditions in other Django apps have been registered.

This commit delays populating the choices until the form is created. This allows all custom conditions to be registered first.

coveralls commented 6 years ago

Pull Request Test Coverage Report for Build 59


Changes Missing Coverage Covered Lines Changed/Added Lines %
flags/tests/test_forms.py 8 9 88.89%
<!-- Total: 12 13 92.31% -->
Files with Coverage Reduction New Missed Lines %
flags/urls.py 2 100.0%
<!-- Total: 2 -->
Totals Coverage Status
Change from base Build 56: -0.1%
Covered Lines: 763
Relevant Lines: 764

💛 - Coveralls
coveralls commented 6 years ago

Pull Request Test Coverage Report for Build 50


Changes Missing Coverage Covered Lines Changed/Added Lines %
flags/tests/test_forms.py 8 9 88.89%
<!-- Total: 12 13 92.31% -->
Files with Coverage Reduction New Missed Lines %
flags/urls.py 2 95.65%
<!-- Total: 2 -->
Totals Coverage Status
Change from base Build 38: -0.4%
Covered Lines: 761
Relevant Lines: 764

💛 - Coveralls
willbarton commented 6 years ago

@callorico Thanks! I'll make sure it gets a review, but for now #6 should fix the Travis error if you rebase or update from master.

callorico commented 6 years ago

Thanks. I've rebased.