(
cls, feature: "Feature", environment: "Environment"
)
| 887 | |
| 888 | @classmethod |
| 889 | def _create_initial_feature_state( |
| 890 | cls, feature: "Feature", environment: "Environment" |
| 891 | ) -> None: |
| 892 | kwargs = { |
| 893 | "feature": feature, |
| 894 | "environment": environment, |
| 895 | "enabled": ( |
| 896 | False |
| 897 | if environment.project.prevent_flag_defaults |
| 898 | else feature.default_enabled |
| 899 | ), |
| 900 | } |
| 901 | if environment.use_v2_feature_versioning: |
| 902 | kwargs.update( |
| 903 | environment_feature_version=EnvironmentFeatureVersion.create_initial_version( |
| 904 | environment=environment, feature=feature |
| 905 | ) |
| 906 | ) |
| 907 | |
| 908 | feature_state = cls.objects.create(**kwargs) |
| 909 | feature_state._send_change_went_live_for_v2_feature_create() |
| 910 | |
| 911 | def _send_change_went_live_for_v2_feature_create(self) -> None: |
| 912 | """ |
no test coverage detected