File tree Expand file tree Collapse file tree
frontend/web/components/pages Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -187,9 +187,12 @@ const EnvironmentSettingsPage: React.FC<EnvironmentSettingsPageProps> = ({
187187 return
188188 }
189189
190- if (
191- environmentData ?. use_v2_feature_versioning &&
190+ const isEnvDataVersioningEnabled = environmentData ?. use_v2_feature_versioning
191+ const isCurrentEnvVersioningDisabled = ! ! currentEnv &&
192192 ! currentEnv ?. use_v2_feature_versioning
193+ if (
194+ isEnvDataVersioningEnabled &&
195+ isCurrentEnvVersioningDisabled
193196 ) {
194197 setCurrentEnv ( ( currentEnvState ) => {
195198 AppActions . editEnv ( environmentData )
@@ -205,6 +208,7 @@ const EnvironmentSettingsPage: React.FC<EnvironmentSettingsPageProps> = ({
205208 isFetchingEnvironment ,
206209 environmentData ,
207210 isSuccessEnvironment ,
211+ currentEnv ,
208212 currentEnv ?. use_v2_feature_versioning ,
209213 ] )
210214
@@ -270,7 +274,7 @@ const EnvironmentSettingsPage: React.FC<EnvironmentSettingsPageProps> = ({
270274 return
271275 }
272276 const editedEnv = { ...currentEnv , ...newEnv }
273-
277+
274278 AppActions . editEnv (
275279 Object . assign ( { } , currentEnv , {
276280 allow_client_traits : ! ! editedEnv ?. allow_client_traits ,
@@ -651,9 +655,10 @@ const EnvironmentSettingsPage: React.FC<EnvironmentSettingsPageProps> = ({
651655 {
652656 minimum_change_request_approvals : value
653657 ? 0
654- : undefined ,
658+ : null ,
655659 } ,
656660 true ,
661+ true
657662 )
658663 }
659664 />
You can’t perform that action at this time.
0 commit comments