cfpb / django-flags

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

Avoid double save in _set_flag_state #115

Closed adamchainz closed 1 year ago

adamchainz commented 1 year ago

FlagState.objects.create calls FlagState.save, but this isn't necessary as the line below calls it after setting the right value. Avoiding this extra save() will speed up creating flags through enable_flag / disable_flag.

willbarton commented 1 year ago

Thank you, @adamchainz!