]> source.dussan.org Git - sonarqube.git/commitdiff
[NO JIRA] Don't allow a profile to select itself as parent
authorWouter Admiraal <wouter.admiraal@sonarsource.com>
Fri, 15 Sep 2023 14:27:13 +0000 (16:27 +0200)
committersonartech <sonartech@sonarsource.com>
Fri, 15 Sep 2023 20:03:06 +0000 (20:03 +0000)
server/sonar-web/src/main/js/apps/quality-profiles/details/ChangeParentForm.tsx

index 04c98341fed62a0155ae5a612b6a977c3c96c868..4f8c69c8fb2bd9737af1d909845e3700bc8b6492 100644 (file)
@@ -88,7 +88,7 @@ export default class ChangeParentForm extends React.PureComponent<Props, State>
           : profile.name,
         value: profile.key,
       })),
-    ];
+    ].filter((o) => o.value !== profile.key);
 
     const submitDisabled = loading || selected == null || selected.value === profile.parentKey;